[vlc-commits] video_output: create an internal function to disable the window
Steve Lhomme
git at videolan.org
Fri Oct 11 11:46:43 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Oct 10 15:12:22 2019 +0200| [55aa5287daabde297edf9f03ce51946f11a5814f] | committer: Steve Lhomme
video_output: create an internal function to disable the window
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=55aa5287daabde297edf9f03ce51946f11a5814f
---
src/video_output/video_output.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index faec343308..45374ec71a 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1732,14 +1732,9 @@ void vout_StopDisplay(vout_thread_t *vout)
video_format_Clean(&sys->original);
}
-void vout_Stop(vout_thread_t *vout)
+static void vout_DisableWindow(vout_thread_t *vout)
{
vout_thread_sys_t *sys = vout->p;
- assert(!sys->dummy);
-
- if (sys->display != NULL)
- vout_StopDisplay(vout);
-
vlc_mutex_lock(&sys->window_lock);
if (sys->window_enabled) {
vout_window_Disable(sys->display_cfg.window);
@@ -1748,6 +1743,17 @@ void vout_Stop(vout_thread_t *vout)
vlc_mutex_unlock(&sys->window_lock);
}
+void vout_Stop(vout_thread_t *vout)
+{
+ vout_thread_sys_t *sys = vout->p;
+ assert(!sys->dummy);
+
+ if (sys->display != NULL)
+ vout_StopDisplay(vout);
+
+ vout_DisableWindow(vout);
+}
+
void vout_Close(vout_thread_t *vout)
{
assert(vout);
@@ -1986,10 +1992,7 @@ int vout_Request(const vout_configuration_t *cfg, input_thread_t *input)
if (vout_Start(vout, cfg))
{
- vlc_mutex_lock(&sys->window_lock);
- vout_window_Disable(sys->display_cfg.window);
- sys->window_enabled = false;
- vlc_mutex_unlock(&sys->window_lock);
+ vout_DisableWindow(vout);
goto error;
}
if (vlc_clone(&sys->thread, Thread, vout, VLC_THREAD_PRIORITY_OUTPUT)) {
More information about the vlc-commits
mailing list