[vlc-devel] [PATCH 1/3] vout: expose vout_StopDisplay

Thomas Guillem thomas at gllm.fr
Mon May 13 13:21:42 CEST 2019


And check if the display need to be stopped from vout_Stop().
---
 src/video_output/video_output.c  | 5 +++--
 src/video_output/vout_internal.h | 5 +++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 6e8c8608eb..d2f3e18f11 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1667,7 +1667,7 @@ noreturn static void *Thread(void *object)
     }
 }
 
-static void vout_StopDisplay(vout_thread_t *vout)
+void vout_StopDisplay(vout_thread_t *vout)
 {
     vout_thread_sys_t *sys = vout->p;
 
@@ -1746,7 +1746,8 @@ void vout_Stop(vout_thread_t *vout)
     vout_thread_sys_t *sys = vout->p;
     assert(!sys->dummy);
 
-    vout_StopDisplay(vout);
+    if (sys->original.i_chroma != 0)
+        vout_StopDisplay(vout);
 
     vlc_mutex_lock(&sys->window_lock);
     if (sys->window_active) {
diff --git a/src/video_output/vout_internal.h b/src/video_output/vout_internal.h
index 5c876db393..0b7118e832 100644
--- a/src/video_output/vout_internal.h
+++ b/src/video_output/vout_internal.h
@@ -222,6 +222,11 @@ void vout_Stop(vout_thread_t *);
 
 void vout_Pause(vout_thread_t *vout);
 
+/**
+ * Stop the display plugin, but keep its window plugin for later reuse.
+ */
+void vout_StopDisplay(vout_thread_t *);
+
 /**
  * Destroys a vout.
  *
-- 
2.20.1



More information about the vlc-devel mailing list