discoverer: also filter 'framed' field when looking for same streams

Fixes extra streams for some mp4 files containing aac audio.
This commit is contained in:
Stefan Sauer 2013-10-14 18:45:16 +02:00
parent 2055f2b7de
commit c07af869a7

View file

@ -997,8 +997,8 @@ find_stream_for_node (GstDiscoverer * dc, const GstStructure * topology)
return st; return st;
} }
/* this can fail due to parsed=TRUE/FALSE differences, thus we filter the /* this can fail due to {framed,parsed}={TRUE,FALSE} differences, thus we filter
* parent */ * the parent */
static gboolean static gboolean
child_is_same_stream (const GstCaps * _parent, const GstCaps * child) child_is_same_stream (const GstCaps * _parent, const GstCaps * child)
{ {
@ -1008,6 +1008,7 @@ child_is_same_stream (const GstCaps * _parent, const GstCaps * child)
for (i = 0; i < size; i++) { 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), "parsed");
gst_structure_remove_field (gst_caps_get_structure (parent, i), "framed");
} }
res = gst_caps_can_intersect (parent, child); res = gst_caps_can_intersect (parent, child);
gst_caps_unref (parent); gst_caps_unref (parent);