summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gst/playback/gstdecodebin2.c20
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;