[vlc-devel] [vlc-commits] skins2: ensure playlist gets stopped before terminating vlc.

erwan.tulou at gmail.com erwan.tulou at gmail.com
Fri Nov 29 23:13:21 CET 2019


On 29/11/2019 20:09, Rémi Denis-Courmont wrote:
> Le perjantaina 29. marraskuuta 2019, 20.43.29 EET Erwan Tulou a écrit :
>> vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Fri Nov 29
>> 19:32:25 2019 +0100| [0594abc06cb1a57548a7c3bf977e3071e64ef022] |
>> committer: Erwan Tulou
>>
>> skins2: ensure playlist gets stopped before terminating vlc.
>>
>>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0594abc06cb1a57548a
>>> 7c3bf977e3071e64ef022
>> ---
>>
>>   modules/gui/skins2/src/skin_main.cpp | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/modules/gui/skins2/src/skin_main.cpp
>> b/modules/gui/skins2/src/skin_main.cpp index 087dd82cc0..d52e904d8d 100644
>> --- a/modules/gui/skins2/src/skin_main.cpp
>> +++ b/modules/gui/skins2/src/skin_main.cpp
>> @@ -143,6 +143,12 @@ static void Close( vlc_object_t *p_this )
>>
>>       msg_Dbg( p_intf, "closing skins2 module" );
>>
>> +    // ensure the playlist is stopped
>> +    vlc_playlist_t *playlist = vlc_intf_GetMainPlaylist( p_intf );
>> +    vlc_playlist_Lock( playlist );
>> +    vlc_playlist_Stop ( playlist );
>> +    vlc_playlist_Unlock( playlist );
> This does not guarantee that the playlist is stopped, only that it was stopped
> until the Unlock. This whole patch does not make sense to me.

Yes, this is a lame way to work out a problem and it actually only solve 
one part of the problem. (so far, the Qt interface does not offer a 
better solution in that matter).

Ideally, once libvlc_Quit() is issued, the right order of 
disabling/removing thing seems the following :

- disable the playlist (which means : stop all inputs, free all 
resources such as vout and make sure it cannot start again)
- stop and desallocate the interfaces
- desallocate the playlist

In particular, it is important that all vouts be freed __before__ the 
interfaces are gone, because the window ids have to remain valid 
(embedded video) as long as the vout are alive.

maybe coding a vlc_playlist_disable() to be called first thing is the 
solution ... any suggestions ?

Rgds
Erwan





>



More information about the vlc-devel mailing list