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.
This commit is contained in:
Sebastian Dröge 2013-05-28 13:06:15 +02:00
parent 9513b770f4
commit d366613401

View file

@ -4107,6 +4107,15 @@ source_pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
goto done; 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; chain = dpad->chain;
dbin = chain->dbin; dbin = chain->dbin;
@ -4174,9 +4183,10 @@ gst_decode_pad_set_blocked (GstDecodePad * dpad, gboolean blocked)
if (blocked) { if (blocked) {
if (dpad->block_id == 0) if (dpad->block_id == 0)
dpad->block_id = dpad->block_id =
gst_pad_add_probe (opad, GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM, gst_pad_add_probe (opad,
source_pad_blocked_cb, gst_object_ref (dpad), GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM |
(GDestroyNotify) gst_object_unref); GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM, source_pad_blocked_cb,
gst_object_ref (dpad), (GDestroyNotify) gst_object_unref);
} else { } else {
if (dpad->block_id != 0) { if (dpad->block_id != 0) {
gst_pad_remove_probe (opad, dpad->block_id); gst_pad_remove_probe (opad, dpad->block_id);