[vlc-devel] [PATCH 2/2] vout: assert that the display is started

Rémi Denis-Courmont remi at remlab.net
Wed Oct 9 14:15:53 CEST 2019


Both LGTM

Le 9 octobre 2019 15:10:11 GMT+03:00, Thomas Guillem <thomas at gllm.fr> a écrit :
>If there is no display, there is no thread and vout_control_Hold() will
>wait
>indefinitely.
>---
> 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 21d55bc89c..a504691386 100644
>--- a/src/video_output/video_output.c
>+++ b/src/video_output/video_output.c
>@@ -1324,6 +1324,7 @@ static int ThreadDisplayPicture(vout_thread_t
>*vout, vlc_tick_t *deadline)
>void vout_ChangePause(vout_thread_t *vout, bool is_paused, vlc_tick_t
>date)
> {
>     assert(!vout->p->dummy);
>+    assert(vout->p->display);
> 
>     vout_control_Hold(&vout->p->control);
>     assert(!vout->p->pause.is_on || !is_paused);
>@@ -1381,6 +1382,7 @@ void vout_Flush(vout_thread_t *vout, vlc_tick_t
>date)
> {
>     vout_thread_sys_t *sys = vout->p;
>     assert(!sys->dummy);
>+    assert(sys->display);
> 
>     vout_control_Hold(&sys->control);
>     vout_FlushUnlocked(vout, false, date);
>@@ -1390,6 +1392,7 @@ void vout_Flush(vout_thread_t *vout, vlc_tick_t
>date)
> void vout_NextPicture(vout_thread_t *vout, vlc_tick_t *duration)
> {
>     assert(!vout->p->dummy);
>+    assert(vout->p->display);
>     *duration = 0;
> 
>     vout_control_Hold(&vout->p->control);
>@@ -1413,6 +1416,7 @@ void vout_ChangeDelay(vout_thread_t *vout,
>vlc_tick_t delay)
> {
>     vout_thread_sys_t *sys = vout->p;
>     assert(!sys->dummy);
>+    assert(sys->display);
> 
>     vout_control_Hold(&sys->control);
>     vlc_clock_SetDelay(vout->p->clock, delay);
>@@ -1424,6 +1428,7 @@ void vout_ChangeRate(vout_thread_t *vout, float
>rate)
> {
>     vout_thread_sys_t *sys = vout->p;
>     assert(!sys->dummy);
>+    assert(sys->display);
> 
>     vout_control_Hold(&sys->control);
>     sys->rate = rate;
>@@ -1610,6 +1615,7 @@ void vout_Cancel(vout_thread_t *vout, bool
>canceled)
> {
>     vout_thread_sys_t *sys = vout->p;
>     assert(!sys->dummy);
>+    assert(sys->display);
> 
>     vout_control_Hold(&sys->control);
>     if (sys->decoder_pool != NULL)
>-- 
>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é.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20191009/c5573505/attachment.html>


More information about the vlc-devel mailing list