[vlc-devel] [PATCH] vout/macos: don't unload library

Pierre Lamot pierre at videolabs.io
Tue Nov 28 16:08:06 CET 2017


On mardi 28 novembre 2017 14:49:00 CET RĂ©mi Denis-Courmont wrote:
> While you shouldn't rely on it, the module only gets unloaded when LibVLC
> exits. This is too late to run the UI main loop.

My use case is people releasing the media player and libvlc from the UI 
thread, for instance while destroying their main window. So the module is 
closed, lib is released and the main loop still exists.

If we can only create/release libvlc from outside UI loops, I think it should 
be clearly stated in the doc.

> Besides, the whole design is very questionable. The same dispatch problem
> exists for Qt (the window is destroyed on UI main loop) and yet, we don't
> need such a kludge. It is as simple as putting the code in the right
> module.

NSView can only be manipulated from the main thread of an application. AFAIK, 
the other Vout  don't have such restrictions.

--
Pierre Lamot



More information about the vlc-devel mailing list