[vlc-devel] [PATCH v3 07/10] video_output: disable rendering on empty size

Alexandre Janniaux ajanni at videolabs.io
Tue Feb 16 15:25:47 UTC 2021


There's no point in trying to render a 0x0 sized picture on the screen
so disable rendering in that case too.
---
 src/video_output/video_output.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index fdcf6e6981..f371276205 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -552,14 +552,17 @@ void vout_ChangeDisplaySize(vout_thread_t *vout,
     assert(!sys->dummy);
 
     /* DO NOT call this outside the vout window callbacks */
+    vlc_mutex_lock(&sys->render_lock);
     vlc_mutex_lock(&sys->display_lock);
 
+    sys->rendering_enabled = width != 0 && height != 0;
     sys->window_width = width;
     sys->window_height = height;
 
     if (sys->display != NULL)
         vout_display_SetSize(sys->display, width, height);
     vlc_mutex_unlock(&sys->display_lock);
+    vlc_mutex_unlock(&sys->render_lock);
 }
 
 void vout_ChangeDisplayFilled(vout_thread_t *vout, bool is_filled)
-- 
2.30.1



More information about the vlc-devel mailing list