[vlc-commits] vout: factor some code
Rémi Denis-Courmont
git at videolan.org
Sun Feb 24 12:51:43 CET 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Feb 24 12:42:44 2019 +0200| [8492f977c6bd38b743145c5a9a15446c1c30569a] | committer: Rémi Denis-Courmont
vout: factor some code
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8492f977c6bd38b743145c5a9a15446c1c30569a
---
src/video_output/video_output.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index e723be87cc..0ad5168251 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1737,12 +1737,12 @@ vout_thread_t *vout_Request(vlc_object_t *object,
return NULL;
}
+ video_format_t original;
+ VoutFixFormat(&original, cfg->fmt);
+
/* If a vout is provided, try reusing it */
if (vout) {
- video_format_t original;
-
sys = vout->p;
- VoutFixFormat(&original, cfg->fmt);
/* TODO: If dimensions are equal or slightly smaller, update the aspect
* ratio and crop settings, instead of recreating a display.
@@ -1771,8 +1771,7 @@ vout_thread_t *vout_Request(vlc_object_t *object,
return NULL;
sys = vout->p;
-
- VoutFixFormat(&sys->original, cfg->fmt);
+ sys->original = original;
vout_window_cfg_t wcfg = {
.is_fullscreen = var_GetBool(vout, "fullscreen"),
More information about the vlc-commits
mailing list