[vlc-devel] [PATCH 3/3] vout: don't drop window size when there is no display plugins yet

Rémi Denis-Courmont remi at remlab.net
Sat Nov 9 00:07:48 CET 2019


There is only one lock involved here, the window lock. It'll obviously lock itself dead if you acquire from a window callback. Like many VLC locks (display lock, aout lock come to mind.)

Le 8 novembre 2019 23:13:30 GMT+09:00, Alexandre Janniaux <ajanni at videolabs.io> a écrit :
>What is the very obvious dead lock?
>
>A situation with two locks doesn't seem obvious from an
>external view.
>
>Regards,
>--
>Alexandre Janniaux
>Videolabs
>
>On Fri, Nov 08, 2019 at 10:49:22PM +0900, Rémi Denis-Courmont wrote:
>> This leads to very obvious dead lock.
>>
>> Le 8 novembre 2019 19:56:17 GMT+09:00, Thomas Guillem
><thomas at gllm.fr> a écrit :
>> >This fixes the window size that was ignored when the size was
>updated
>> >from the
>> >open callback of the window plugin.
>> >
>> >Fixes #22674
>> >---
>> > src/video_output/video_output.c | 6 ++++++
>> > 1 file changed, 6 insertions(+)
>> >
>> >diff --git a/src/video_output/video_output.c
>> >b/src/video_output/video_output.c
>> >index db48538fd9c..ff36250d23d 100644
>> >--- a/src/video_output/video_output.c
>> >+++ b/src/video_output/video_output.c
>> >@@ -424,7 +424,13 @@ void vout_ChangeDisplaySize(vout_thread_t
>*vout,
>> >     assert(!sys->dummy);
>> >
>> >     /* DO NOT call this outside the vout window callbacks */
>> >+    vlc_mutex_lock(&sys->window_lock);
>> >+    sys->display_cfg.display.width = width;
>> >+    sys->display_cfg.display.height = height;
>> >+
>> >     vlc_mutex_lock(&sys->display_lock);
>> >+    vlc_mutex_unlock(&sys->window_lock);
>> >+
>> >     if (sys->display != NULL)
>> >         vout_display_SetSize(sys->display, width, height);
>> >     vlc_mutex_unlock(&sys->display_lock);
>> >--
>> >2.20.1
>> >
>> >_______________________________________________
>> >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é.
>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
>_______________________________________________
>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/20191109/608124da/attachment.html>


More information about the vlc-devel mailing list