tagdemux: Propagate flow returns from gst_type_find_helper_get_range() properly
authorSebastian Dröge <sebastian@centricular.com>
Wed, 8 Aug 2018 10:44:55 +0000 (12:44 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 8 Aug 2018 10:46:43 +0000 (12:46 +0200)
Instead of considering every failed typefinding as an error, even in
case of e.g. GST_FLOW_FLUSHING.

gst-libs/gst/tag/gsttagdemux.c

index 5af245304db35730af5cba03679768d7b754f3d2..1443ff9da9a13b11714482b09619ce7af2ed74b1 100644 (file)
@@ -1365,11 +1365,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);