decodebin2: Don't take locks when deactivating pads
authorEdward Hervey <edward@centricular.com>
Tue, 14 Nov 2017 12:34:48 +0000 (13:34 +0100)
committerEdward Hervey <bilboed@bilboed.com>
Tue, 14 Nov 2017 12:40:48 +0000 (13:40 +0100)
commit77e5a71a1538e747b30c40b8b83cb2be42b02161
tree44cf7bef1b677b2a1d1bbcee84014958bc7d8c44
parentc7917df7e22f1fcf543cea1acb4066d13f4e1d41
decodebin2: Don't take locks when deactivating pads

When deactivating pads, we need to ensure that the streaming threads
going through the pads we wish to deactivate can cleanly return.
Failure to do that would result in the streaming locks of those
pads never being released. The end result would be a deadlock
when stopping decodebin2.

In order to avoid that situation, release the "dyn" lock around
the deactivation code. And refactor the code to cope with the
list of blocked pads having potentially changed when re-acquiring
the lock.
gst/playback/gstdecodebin2.c