typefind: Add new gst_type_find_helper_get_range_full() that returns flow return
[platform/upstream/gstreamer.git] / plugins / elements / gsttypefindelement.c
index bd48152..676e78d 100644 (file)
@@ -1139,16 +1139,19 @@ gst_type_find_element_loop (GstPad * pad)
         }
         ext = gst_type_find_get_extension (typefind, pad);
 
-        found_caps =
-            gst_type_find_helper_get_range (GST_OBJECT_CAST (peer),
+        ret =
+            gst_type_find_helper_get_range_full (GST_OBJECT_CAST (peer),
             GST_OBJECT_PARENT (peer),
             (GstTypeFindHelperGetRangeFunction) (GST_PAD_GETRANGEFUNC (peer)),
-            (guint64) size, ext, &probability);
+            (guint64) size, ext, &found_caps, &probability);
         g_free (ext);
 
         GST_DEBUG ("Found caps %" GST_PTR_FORMAT, found_caps);
 
         gst_object_unref (peer);
+
+        if (ret != GST_FLOW_OK)
+          goto pause;
       }
     }