discoverer: Ignore more parser related fields when comparing streams
authorThibault Saunier <thibault.saunier@osg.samsung.com>
Wed, 8 Feb 2017 14:42:45 +0000 (11:42 -0300)
committerThibault Saunier <thibault.saunier@osg.samsung.com>
Wed, 8 Feb 2017 18:56:34 +0000 (15:56 -0300)
The parser might do some conversion on a stream but the stream keeps
being the same, and we need to make sure GstDiscoverer detects it is the
case.

https://bugzilla.gnome.org/show_bug.cgi?id=778298

gst-libs/gst/pbutils/gstdiscoverer.c

index 96fa397..090e39a 100644 (file)
@@ -1070,6 +1070,10 @@ child_is_same_stream (const GstCaps * _parent, const GstCaps * child)
   for (i = 0; i < size; i++) {
     gst_structure_remove_field (gst_caps_get_structure (parent, i), "parsed");
     gst_structure_remove_field (gst_caps_get_structure (parent, i), "framed");
+    gst_structure_remove_field (gst_caps_get_structure (parent, i),
+        "stream-format");
+    gst_structure_remove_field (gst_caps_get_structure (parent, i),
+        "alignment");
   }
   res = gst_caps_can_intersect (parent, child);
   gst_caps_unref (parent);