adaptivedemux: release the manifest lock ...
authorMathieu Duponchelle <mathieu.duponchelle@opencreed.com>
Wed, 31 May 2017 00:46:01 +0000 (02:46 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Mon, 12 Jun 2017 14:10:26 +0000 (16:10 +0200)
commit799b1670bbae8bf38f92280151eb43d8d41e0b67
treedfd0f7b3fc3f2621d91cdb8637cd90999a586db6
parent55a7fb856a63f713436945d38d633f0f4206bcce
adaptivedemux: release the manifest lock ...

before broadcasting preroll.

The deadlock was as follows:

-> The subclass pushes a buffer on a newly-created stream in T1
-> We take the preroll lock in T1, to handle_preroll
-> The demuxer is stopped in T2, we take the MANIFEST_LOCK
-> T1 starts blocking because it received a reconfigure event
   and needs to take the MANIFEST_LOCK
-> T2 deadlocks because it now wants the preroll_lock.

https://bugzilla.gnome.org/show_bug.cgi?id=783255
gst-libs/gst/adaptivedemux/gstadaptivedemux.c