vlc | branch: master | Steve Lhomme <[email protected]> | Thu Oct 10 15:14:05 2019 +0200| [2c10d4f1847ff29acd641356502960c071151d94] | committer: Steve Lhomme
video_output: add a function to release the display separately from its thread vout_Stop does a vout_StopDisplay + vout_DisableWindow When we failed to start the thread we shouldn't stop it (by calling vout_StopDisplay) So just call vout_ReleaseDisplay + vout_DisableWindow > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2c10d4f1847ff29acd641356502960c071151d94 --- src/video_output/video_output.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c index 44b2fb503d..060768e1ab 100644 --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c @@ -1688,13 +1688,11 @@ noreturn static void *Thread(void *object) } } -void vout_StopDisplay(vout_thread_t *vout) +static void vout_ReleaseDisplay(vout_thread_t *vout) { vout_thread_sys_t *sys = vout->p; assert(sys->display != NULL); - vlc_cancel(sys->thread); - vlc_join(sys->thread, NULL); if (sys->spu_blend != NULL) filter_DeleteBlend(sys->spu_blend); @@ -1732,6 +1730,16 @@ void vout_StopDisplay(vout_thread_t *vout) video_format_Clean(&sys->original); } +void vout_StopDisplay(vout_thread_t *vout) +{ + vout_thread_sys_t *sys = vout->p; + + vlc_cancel(sys->thread); + vlc_join(sys->thread, NULL); + + vout_ReleaseDisplay(vout); +} + static void vout_DisableWindow(vout_thread_t *vout) { vout_thread_sys_t *sys = vout->p; @@ -2010,7 +2018,8 @@ int vout_Request(const vout_configuration_t *cfg, input_thread_t *input) return -1; } if (vlc_clone(&sys->thread, Thread, vout, VLC_THREAD_PRIORITY_OUTPUT)) { - vout_Stop(vout); + vout_ReleaseDisplay(vout); + vout_DisableWindow(vout); return -1; } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
