decodebin: Block on caps event
authorEdward Hervey <edward.hervey@collabora.co.uk>
Wed, 18 Jul 2012 13:24:00 +0000 (15:24 +0200)
committerEdward Hervey <edward.hervey@collabora.co.uk>
Wed, 18 Jul 2012 16:17:57 +0000 (18:17 +0200)
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.

gst/playback/gstdecodebin2.c

index b2dd3ef..e4198e6 100644 (file)
@@ -3866,6 +3866,7 @@ source_pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
   GstDecodeBin *dbin;
 
   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_SERIALIZED (GST_PAD_PROBE_INFO_EVENT (info)))) {
     /* do not block on sticky or out of band events otherwise the allocation query