diff options
author | Reynaldo H. Verdejo Pinochet <r.verdejo@partner.samsung.com> | 2013-10-24 13:21:21 -0700 |
---|---|---|
committer | Reynaldo H. Verdejo Pinochet <r.verdejo@partner.samsung.com> | 2013-10-24 13:21:21 -0700 |
commit | 2027db7e844581278daf6272203a2ff717dc3c01 (patch) | |
tree | c1e28301b19648d2f0715528a7c528fb11126635 | |
parent | b13385f96abfca2a9118adb2de7f064e3c1636ab (diff) |
decodebin: Respect expose-all-streams if set682629
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
-rw-r--r-- | gst/playback/gstdecodebin2.c | 20 |
1 files 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; |