vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Thu Jan 24 22:55:03 2019 +0200| [14fd28fc1c7f7987ddf46ca5226fa1864005d954] | committer: Rémi Denis-Courmont
vout: ignore the display configuration when stopping Each parameter generally fell in one of three category: 1) parameter that could not change: - window, - alignement, - pixel aspect ratio; 2) parameter whose value was ignored: - window size; 3) parameter whose value was actually saved from the old display and restored to the new display: - fill flag, - zoom, - viewpoint. The last three are now correctly tracked in the vout configuration, so they no longer need to be retrieved from the display being stopped. (As a side benefit, the parameter can be tuned even if the vout is inactive.) This addresses the FIXME from c75fafe4ec348154a6e07c324dbe62c1c23a7149. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=14fd28fc1c7f7987ddf46ca5226fa1864005d954 --- src/video_output/video_output.c | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c index 8a21d40983..b02fbbe89d 100644 --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c @@ -1672,28 +1672,20 @@ static int ThreadReinit(vout_thread_t *vout, vout_display_cfg_t dcfg = { }; - ThreadStop(vout, &dcfg); + ThreadStop(vout, NULL); vout_ReinitInterlacingSupport(vout); -#if defined(_WIN32) || defined(__OS2__) - if (!dcfg.is_fullscreen) -#endif - { - dcfg.display.width = 0; - dcfg.display.height = 0; - } - - /* FIXME current vout "variables" are not in sync here anymore - * and I am not sure what to do */ - if (dcfg.display.sar.num <= 0 || dcfg.display.sar.den <= 0) { - dcfg.display.sar.num = 1; - dcfg.display.sar.den = 1; - } - if (dcfg.zoom.num == 0 || dcfg.zoom.den == 0) { - dcfg.zoom.num = 1; - dcfg.zoom.den = 1; - } + vlc_mutex_lock(&vout->p->window_lock); + dcfg = vout->p->display_cfg; + /* Any configuration change after unlocking will involve a control request + * that will be processed later. There may also be some pending control + * requests for configuration change already visible in display_cfg, + * leading to harmless albeit useless control request processing. + * + * TODO: display lock separate from window lock. + */ + vlc_mutex_unlock(&vout->p->window_lock); video_format_Clean(&vout->p->original); vout->p->original = original; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
