vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Wed Jun 12 19:22:10 2019 +0300| [456780930113a07acab0ece74821d60c6920e971] | committer: Rémi Denis-Courmont
vout: nul display pointer when appropriate 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. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=456780930113a07acab0ece74821d60c6920e971 --- 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 90f389ab08..d399bea408 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 */ _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
