summaryrefslogtreecommitdiffstats
path: root/gst/apetag
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@mad.scientist.com>2006-03-22 13:00:34 +0000
committerJan Schmidt <thaytan@mad.scientist.com>2006-03-22 13:00:34 +0000
commit3f72e7205c620413fdd89fe21d5c6752b3edc405 (patch)
treeb86d9356e6d0978be66788f3e73947c584fa6ee7 /gst/apetag
parente7a2d7734de7031d5ea9d24b0bb68603e9325778 (diff)
gst/: Don't attempt typefinding on too-short buffers that have been completely trimmed away.
Original commit message from CVS: * gst/apetag/gsttagdemux.c: (gst_tag_demux_chain): * gst/id3demux/gstid3demux.c: (gst_id3demux_chain): Don't attempt typefinding on too-short buffers that have been completely trimmed away. * gst/id3demux/id3tags.c: (id3demux_read_id3v2_tag): Improve the debug output
Diffstat (limited to 'gst/apetag')
-rw-r--r--gst/apetag/gsttagdemux.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gst/apetag/gsttagdemux.c b/gst/apetag/gsttagdemux.c
index 2c42b599..53ca1881 100644
--- a/gst/apetag/gsttagdemux.c
+++ b/gst/apetag/gsttagdemux.c
@@ -543,7 +543,8 @@ gst_tag_demux_chain (GstPad * pad, GstBuffer * buf)
GstBuffer *typefind_buf = NULL;
GstCaps *caps;
- if (GST_BUFFER_SIZE (demux->priv->collect) < TYPE_FIND_MIN_SIZE)
+ if (GST_BUFFER_SIZE (demux->priv->collect) <
+ TYPE_FIND_MIN_SIZE + demux->priv->strip_start)
break; /* Go get more data first */
GST_DEBUG_OBJECT (demux, "Typefinding with size %d",
@@ -555,6 +556,9 @@ gst_tag_demux_chain (GstPad * pad, GstBuffer * buf)
if (!gst_tag_demux_trim_buffer (demux, &typefind_buf))
return GST_FLOW_ERROR;
+ if (typefind_buf == NULL)
+ break; /* Still need more data */
+
caps = gst_type_find_helper_for_buffer (GST_OBJECT (demux),
typefind_buf, &probability);