[vlc-devel] [PATCH] vout: disable window when vout_Start() fails

Thomas Guillem thomas at gllm.fr
Thu May 9 16:12:09 CEST 2019


---
 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 b84336ac23..ea1d90705a 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1878,7 +1878,13 @@ int vout_Request(const vout_configuration_t *cfg, input_thread_t *input)
     vlc_mutex_unlock(&sys->window_lock);
 
     if (vout_Start(vout, cfg))
+    {
+        vlc_mutex_lock(&sys->window_lock);
+        vout_window_Disable(sys->display_cfg.window);
+        sys->window_active = false;
+        vlc_mutex_unlock(&sys->window_lock);
         goto error;
+    }
     if (vlc_clone(&sys->thread, Thread, vout, VLC_THREAD_PRIORITY_OUTPUT)) {
         vout_Stop(vout);
 error:
-- 
2.20.1



More information about the vlc-devel mailing list