summaryrefslogtreecommitdiff
path: root/gst/playback/gstdecodebin2.c
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2013-05-28 13:06:15 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2013-05-28 13:06:15 +0200
commitd36661340100fa2bed8760386c0f7c90ab6afa50 (patch)
treea23979a6248aaa5b3f0080f173b0d2ff80cf5b3d /gst/playback/gstdecodebin2.c
parent9513b770f40b133da85f867f1f17e9890e7fcfc8 (diff)
decodebin: Block on serialized queries too
Otherwise we will only block after the serialized, non-sticky event after the CAPS event or the first buffer. If we're waiting for another pad to finish autoplugging after we got final caps on this pad, it will mean that we will let the ALLOCATION query pass although the pad is not exposed yet.
Diffstat (limited to 'gst/playback/gstdecodebin2.c')
-rw-r--r--gst/playback/gstdecodebin2.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c
index 3b5479854..051d970ce 100644
--- a/gst/playback/gstdecodebin2.c
+++ b/gst/playback/gstdecodebin2.c
@@ -4107,6 +4107,15 @@ source_pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
goto done;
}
}
+ } else if (GST_PAD_PROBE_INFO_TYPE (info) &
+ GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM) {
+ GstQuery *query = GST_PAD_PROBE_INFO_QUERY (info);
+
+ if (!GST_QUERY_IS_SERIALIZED (query)) {
+ /* do not block on non-serialized queries */
+ GST_LOG_OBJECT (pad, "Letting non-serialized query through");
+ return GST_PAD_PROBE_PASS;
+ }
}
chain = dpad->chain;
dbin = chain->dbin;
@@ -4174,9 +4183,10 @@ gst_decode_pad_set_blocked (GstDecodePad * dpad, gboolean blocked)
if (blocked) {
if (dpad->block_id == 0)
dpad->block_id =
- gst_pad_add_probe (opad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM,
- source_pad_blocked_cb, gst_object_ref (dpad),
- (GDestroyNotify) gst_object_unref);
+ gst_pad_add_probe (opad,
+ GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM |
+ GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM, source_pad_blocked_cb,
+ gst_object_ref (dpad), (GDestroyNotify) gst_object_unref);
} else {
if (dpad->block_id != 0) {
gst_pad_remove_probe (opad, dpad->block_id);