[vlc-devel] [PATCH] vout: fix double mutex destroy
Thomas Guillem
thomas at gllm.fr
Tue Apr 16 11:55:04 CEST 2019
And move window deletion from vout_Close() to vout_Release(). That way, the
window is always valid during the lifetime of the vout. This simplify window
NULL checks.
Note: vout_IntfDeinit() is called from vout_Close(). So, theoretically, no
functions touching the window can be called after this call. This may change in
the future if we want to control the vout from functions directly.
---
src/video_output/video_output.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 9604522825..5681acb9aa 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1690,9 +1690,6 @@ void vout_Close(vout_thread_t *vout)
vout_control_Dead(&sys->control);
vout_chrono_Clean(&sys->render);
- vlc_mutex_destroy(&sys->window_lock);
- vout_display_window_Delete(sys->display_cfg.window);
-
vlc_mutex_lock(&sys->spu_lock);
spu_Destroy(sys->spu);
sys->spu = NULL;
@@ -1714,6 +1711,9 @@ void vout_Release(vout_thread_t *vout)
vlc_mutex_destroy(&vout->p->window_lock);
vlc_mutex_destroy(&vout->p->spu_lock);
vlc_mutex_destroy(&vout->p->filter.lock);
+
+ vout_display_window_Delete(sys->display_cfg.window);
+
vout_control_Clean(&vout->p->control);
/* */
--
2.20.1
More information about the vlc-devel
mailing list