decodebin: Block on caps event

A caps event is also used to establish that a stream has prerolled.

Without this, we end up allowing negotiation queries to fail, ending
in decoders (and other elements) to not be configured right from the
start with the most optimal settings.
This commit is contained in:
Edward Hervey 2012-07-18 15:24:00 +02:00
parent 0423329f91
commit c5901cebca

View file

@ -3866,6 +3866,7 @@ source_pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
GstDecodeBin *dbin; GstDecodeBin *dbin;
if ((GST_PAD_PROBE_INFO_TYPE (info) & GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) && if ((GST_PAD_PROBE_INFO_TYPE (info) & GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) &&
(GST_EVENT_TYPE (GST_PAD_PROBE_INFO_EVENT (info)) != GST_EVENT_CAPS) &&
(GST_EVENT_IS_STICKY (GST_PAD_PROBE_INFO_EVENT (info)) (GST_EVENT_IS_STICKY (GST_PAD_PROBE_INFO_EVENT (info))
|| !GST_EVENT_IS_SERIALIZED (GST_PAD_PROBE_INFO_EVENT (info)))) { || !GST_EVENT_IS_SERIALIZED (GST_PAD_PROBE_INFO_EVENT (info)))) {
/* do not block on sticky or out of band events otherwise the allocation query /* do not block on sticky or out of band events otherwise the allocation query