vlc | branch: master | Steve Lhomme <[email protected]> | Fri Oct 11 11:38:33 2019 +0200| [8a2efcb528847fe46fb5c82d1ff1d6f191d9df19] | committer: Steve Lhomme
video_output: separate the error logs and return in vout_Request No need to stop the vout (thread, display) when failing to enable the window. If there wasn't an enabled window, there wasn't any of them. vout_Stop already cleans sys->original, so no need to do it again. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8a2efcb528847fe46fb5c82d1ff1d6f191d9df19 --- src/video_output/video_output.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c index 45374ec71a..be31598b3d 100644 --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c @@ -1977,7 +1977,9 @@ int vout_Request(const vout_configuration_t *cfg, input_thread_t *input) if (vout_window_Enable(sys->display_cfg.window, &wcfg)) { vlc_mutex_unlock(&sys->window_lock); - goto error; + msg_Err(vout, "failed to enable window"); + video_format_Clean(&sys->original); + return -1; } sys->window_enabled = true; } else @@ -1992,14 +1994,13 @@ int vout_Request(const vout_configuration_t *cfg, input_thread_t *input) if (vout_Start(vout, cfg)) { + msg_Err(vout, "video output display creation failed"); + video_format_Clean(&sys->original); vout_DisableWindow(vout); - goto error; + return -1; } if (vlc_clone(&sys->thread, Thread, vout, VLC_THREAD_PRIORITY_OUTPUT)) { vout_Stop(vout); -error: - msg_Err(vout, "video output creation failed"); - video_format_Clean(&sys->original); return -1; } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
