decodebin: an element can negotiate before we block it
authorAlessandro Decina <alessandro.d@gmail.com>
Wed, 4 May 2016 01:33:50 +0000 (11:33 +1000)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 4 May 2016 07:13:44 +0000 (10:13 +0300)
commitfe4e9bb02cc859715eaac37ca4ee02e3b9e4f76e
treec18b867a0e005e4408bb89a617af8865ad1836a2
parent60c765174f02a16eab0480c6c9971c3edfbeeed9
decodebin: an element can negotiate before we block it

When we initialize an element in decodebin, we 1) set it to PAUSED and
push sticky events on its sinkpad to trigger negotiation 2) block its
src pad(s) to detect CAPS events. We can't block before 1) as that
would lead to a deadlock.

It's possible (and common) tho that an element configures its srcpad
during 1) and before 2). Therefore before this change we would
typically block and expose an element's pad only once the element
output its first buffer, triggering sticky events to be resent. One
consequence of this behaviour is that it sometimes broke
renegotiation.

With this change now we consider a pad ready to be exposed when it's
->blocked or has fixed caps (which were set before we could block it).

https://bugzilla.gnome.org/show_bug.cgi?id=765456
gst/playback/gstdecodebin2.c