[vlc-devel] Handling deadlock between display:Open() and vout_window_ReportSize()

Rémi Denis-Courmont remi at remlab.net
Sun Dec 15 12:37:24 CET 2019

Le sunnuntaina 15. joulukuuta 2019, 13.20.43 EET Alexandre Janniaux a écrit :
> Hi,
> After some thoughs, surveys of locks and schematics I might
> have a solution for allowing the vout_display::Open to block
> the main thread without additional lock.
> It seems that I can just move the display creation outside of
> the display_lock, and then lock it to share it with sys while
> applying the pending requested state after the Open() has
> ended, so that the behaviour stays the same.

That breaks the lock chaining which ensures that the configuration stays in in 
synchronization in the window, display and core.

Besides, it solves exactly nothing. You still need to lock the display for 
pretty much every other calls, which leads to the same deadlocks.

And further besides, you _cannot_ block on the application main loop from 
output plugins of any kind, as it causes recursion or dead lock when the 
application invokes LibVLC functions. This has nothing to do with the video 
output, really.


More information about the vlc-devel mailing list