From 2027db7e844581278daf6272203a2ff717dc3c01 Mon Sep 17 00:00:00 2001 From: "Reynaldo H. Verdejo Pinochet" Date: Thu, 24 Oct 2013 13:21:21 -0700 Subject: decodebin: Respect expose-all-streams if set Currently streams with unknown caps aren't been exposed even with expose-all-streams = TRUE, which is the default. https://bugzilla.gnome.org/show_bug.cgi?id=682629 --- gst/playback/gstdecodebin2.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c index 2d4e93059..7a00da8f8 100644 --- a/gst/playback/gstdecodebin2.c +++ b/gst/playback/gstdecodebin2.c @@ -1501,15 +1501,17 @@ analyze_new_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad, } } - if ((caps == NULL) || gst_caps_is_empty (caps)) - goto unknown_type; - - if (gst_caps_is_any (caps)) - goto any_caps; + if (caps != NULL) { + if (gst_caps_is_any (caps)) + goto any_caps; + } if (!chain->current_pad) chain->current_pad = gst_decode_pad_new (dbin, chain); + if ((caps == NULL) || gst_caps_is_empty (caps)) + goto unknown_type; + dpad = gst_object_ref (chain->current_pad); gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (dpad), pad); @@ -1571,7 +1573,6 @@ analyze_new_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad, /* if not we have a unhandled type with no compatible factories */ g_value_array_free (factories); - gst_object_unref (dpad); goto unknown_type; } @@ -1712,12 +1713,12 @@ analyze_new_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad, if (is_parser_converter) gst_object_unref (pad); - gst_object_unref (dpad); g_value_array_free (factories); if (!res) goto unknown_type; + gst_object_unref (dpad); return; expose_pad: @@ -1750,7 +1751,7 @@ unknown_type: { GST_LOG_OBJECT (pad, "Unknown type, posting message and firing signal"); - chain->deadend = TRUE; + chain->deadend = !dbin->expose_allstreams; chain->endcaps = gst_caps_ref (caps); gst_object_replace ((GstObject **) & chain->current_pad, NULL); @@ -1767,6 +1768,9 @@ unknown_type: } EXPOSE_UNLOCK (dbin); + expose_pad (dbin, src, dpad, pad, caps, chain); + gst_object_unref (dpad); + if (src == dbin->typefind) { gchar *desc; -- cgit v1.2.3