[vlc-devel] [PATCH 05/16] qt: don't release vout window when the interface has already been destroyed
pierre at videolabs.io
Fri Aug 7 10:53:04 CEST 2020
>> +static bool WindowClose( vout_window_t *p_wnd )
>> + MainInterface *p_mi = (MainInterface *)p_wnd->sys;
>> + vlc::threads::mutex_locker locker (lock);
>> + /* Normally, the interface terminates after the video. In the
>> + * Qt main loop is gone, so we cannot send any event to the user
>> + * widgets. Ideally, we would keep the Qt main loop running
>> until after
>> + * the video window is released. But it is far simpler to
>> just have the Qt
>> + * thread destroy the window early, and to turn this
>> function into a stub.
>> + *
>> + * That assumes the video output will behave sanely if it window
>> + * destroyed asynchronously.
>> + * XCB and Xlib-XCB are fine with that. Plain Xlib wouldn't, */
> It would certainly be far simpler, if it worked, but as the second
> states, it does *not* work. You _cannot_ do that. The window handle
> MUST be
> valid until the vout_twindow_t.disable callback is invoked. You MUST
> deal with
> Otherwise, nothing except XCB works: GL crashes or locks up, Xlib
> aborts, and
> Vulkan probably crashes or locks up like GL. I can only guess that DX
> WinGL don't handle it well either. Nowadays, VLC rarely ever uses XCB,
> XCB/RENDER or plain XCB outputs.
Hi, thanks for the review.
This was directly re-imported from the 3.0 code.
the real issue here is that we no longer have an equivalent of 3.0
playlist_Deactivate that would properly terminate the player/playlist.
More information about the vlc-devel