[vlc-devel] [PATCH 03/13] vout: nul display pointer when appropriate
RĂ©mi Denis-Courmont
remi at remlab.net
Wed Jun 12 19:48:27 CEST 2019
This makes sure that the display pointer is NULL when there is no
display. That way, we can access the display outside the the vout
control thread.
---
src/video_output/video_output.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 3768d80112..0baba7e055 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1493,6 +1493,7 @@ static int vout_Start(vout_thread_t *vout, const vout_configuration_t *cfg)
vlc_mutex_unlock(&sys->window_lock);
if (vout_OpenWrapper(vout, sys->splitter_name, &dcfg)) {
+ assert(sys->display == NULL);
vlc_mutex_unlock(&sys->display_lock);
goto error;
}
@@ -1669,13 +1670,14 @@ void vout_StopDisplay(vout_thread_t *vout)
if (sys->spu_blend != NULL)
filter_DeleteBlend(sys->spu_blend);
- /* Destroy translation tables */
+ /* Destroy the rendering display */
if (sys->display != NULL) {
if (sys->decoder_pool != NULL)
vout_FlushUnlocked(vout, true, INT64_MAX);
vlc_mutex_lock(&sys->display_lock);
vout_CloseWrapper(vout);
+ sys->display = NULL;
vlc_mutex_unlock(&sys->display_lock);
}
@@ -1848,6 +1850,7 @@ vout_thread_t *vout_Create(vlc_object_t *object)
vlc_mutex_init(&sys->filter.lock);
/* Display */
+ sys->display = NULL;
vlc_mutex_init(&sys->display_lock);
/* Window */
--
2.20.1
More information about the vlc-devel
mailing list