summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2018-08-08 12:44:55 +0200
committerSebastian Dröge <sebastian@centricular.com>2018-08-08 12:53:57 +0200
commit2b274a220fd343f98debed61981fa2794e4746a5 (patch)
tree2059c7638f76b5ca951b8d3e297f5c73711b8256
parent93dd3a27edde72bba56d881d00fe34102c8d4e63 (diff)
downloadgstreamer-plugins-base-2b274a220fd343f98debed61981fa2794e4746a5.tar.gz
tagdemux: Propagate flow returns from gst_type_find_helper_get_range() properly
Instead of considering every failed typefinding as an error, even in case of e.g. GST_FLOW_FLUSHING.
-rw-r--r--gst-libs/gst/tag/gsttagdemux.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gst-libs/gst/tag/gsttagdemux.c b/gst-libs/gst/tag/gsttagdemux.c
index f31d15e1c..98cf64650 100644
--- a/gst-libs/gst/tag/gsttagdemux.c
+++ b/gst-libs/gst/tag/gsttagdemux.c
@@ -1355,11 +1355,13 @@ gst_tag_demux_element_find (GstTagDemux * demux)
if (GST_PAD_MODE (demux->priv->srcpad) == GST_PAD_MODE_PULL)
goto skip_typefinding;
- caps = gst_type_find_helper_get_range (GST_OBJECT (demux), NULL,
+ ret = gst_type_find_helper_get_range_full (GST_OBJECT (demux), NULL,
(GstTypeFindHelperGetRangeFunction) gst_tag_demux_read_range,
demux->priv->upstream_size
- (demux->priv->strip_start + demux->priv->strip_end), NULL,
- &probability);
+ &caps, &probability);
+ if (ret != GST_FLOW_OK)
+ goto read_tag_error;
GST_INFO_OBJECT (demux, "Found type %" GST_PTR_FORMAT " with a "
"probability of %u", caps, probability);