[vlc-devel] [vlc-commits] vout: remove dead code

Rémi Denis-Courmont remi at remlab.net
Thu May 9 16:22:09 CEST 2019


Well the assertion is doing its job, finding preexisting bugs.

Le 9 mai 2019 16:52:07 GMT+03:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>This commit make VLC crash with "--vout=none"
>
>It assert in vout_Release() on "assert(!sys->window_active);"
>
>After commit a1924dbd8bb3e3c146ef150191dcf8ffa0be0a59 "resource: 
>atomically return vout on failure (fixes #22284)" it's not an assert 
>anymore. It's a hard crash. vout_Request() is called with cfg->vout
>NULL.
>
>
>
>On 2019-05-08 20:21, Rémi Denis-Courmont wrote:
>> vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed
>May  8 18:54:01 2019 +0300| [587a5e2ac478b151848c06a55b1c9f7960f272de]
>| committer: Rémi Denis-Courmont
>> 
>> vout: remove dead code
>> 
>> If the vout was not stopped explicitly, vout_Close() will call
>> vout_Stop() anyway. Either way, the window is necessarily disabled
>when
>> the last reference to the vout is dropped.
>> 
>>>
>http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=587a5e2ac478b151848c06a55b1c9f7960f272de
>> ---
>> 
>>   src/video_output/video_output.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>> 
>> diff --git a/src/video_output/video_output.c
>b/src/video_output/video_output.c
>> index 27a269e9d9..ce7ca69b83 100644
>> --- a/src/video_output/video_output.c
>> +++ b/src/video_output/video_output.c
>> @@ -1715,8 +1715,7 @@ void vout_Release(vout_thread_t *vout)
>>       vlc_mutex_destroy(&vout->p->spu_lock);
>>       vlc_mutex_destroy(&vout->p->filter.lock);
>>   
>> -    if (sys->window_active)
>> -        vout_window_Disable(sys->display_cfg.window);
>> +    assert(!sys->window_active);
>>       vout_display_window_Delete(sys->display_cfg.window);
>>   
>>       vout_control_Clean(&vout->p->control);
>> 
>> _______________________________________________
>> vlc-commits mailing list
>> vlc-commits at videolan.org
>> https://mailman.videolan.org/listinfo/vlc-commits
>> 
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190509/470d5ffc/attachment.html>


More information about the vlc-devel mailing list