From: Sebastian Dröge Date: Thu, 18 May 2017 10:13:58 +0000 (+0300) Subject: Revert "discoverer: Consider parent/child streams the same if they have caps with... X-Git-Tag: 1.19.3~511^2~2236 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5614862de169f1c104c3aa50b29bfce6f6130173;p=platform%2Fupstream%2Fgstreamer.git Revert "discoverer: Consider parent/child streams the same if they have caps with the same name" This reverts commit 478b7a8eb49d285c3ff0b73e1fe2929b9418be91. video/mpeg,systemstream=true / false distinguishes between container and elementary stream. --- diff --git a/gst-libs/gst/pbutils/gstdiscoverer.c b/gst-libs/gst/pbutils/gstdiscoverer.c index 92cf092..5d742a6 100644 --- a/gst-libs/gst/pbutils/gstdiscoverer.c +++ b/gst-libs/gst/pbutils/gstdiscoverer.c @@ -1052,21 +1052,33 @@ find_stream_for_node (GstDiscoverer * dc, const GstStructure * topology) /* this can fail due to {framed,parsed}={TRUE,FALSE} differences, thus we filter * the parent */ static gboolean -child_is_same_stream (const GstCaps * parent, const GstCaps * child) +child_is_same_stream (const GstCaps * _parent, const GstCaps * child) { - const GstStructure *s1, *s2; + GstCaps *parent; + guint i, size; + gboolean res; - if (parent == child) + if (_parent == child) return TRUE; - if (!parent) + if (!_parent) return FALSE; if (!child) return FALSE; - s1 = gst_caps_get_structure (parent, 0); - s2 = gst_caps_get_structure (child, 0); + parent = gst_caps_copy (_parent); + size = gst_caps_get_size (parent); - return gst_structure_has_name (s1, gst_structure_get_name (s2)); + 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); + return res; }