[vlc-devel] [PATCH 20/24] vout: yuv: refactor for next changes

Thomas Guillem thomas at gllm.fr
Wed Oct 31 17:50:15 CET 2018


vd->fmt and vd->cfg will be removed.
fmt and cfg will be passed by Open() and controls.
---
 modules/video_output/yuv.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/yuv.c b/modules/video_output/yuv.c
index dc1864dcb7..d5dbd93201 100644
--- a/modules/video_output/yuv.c
+++ b/modules/video_output/yuv.c
@@ -95,6 +95,7 @@ struct vout_display_sys_t {
 static int Open(vlc_object_t *object)
 {
     vout_display_t *vd = (vout_display_t *)object;
+    video_format_t *fmtp = &vd->fmt;
     vout_display_sys_t *sys;
 
     /* Allocate instance and initialize some members */
@@ -149,12 +150,12 @@ static int Open(vlc_object_t *object)
 
     /* */
     video_format_t fmt;
-    video_format_ApplyRotation(&fmt, &vd->fmt);
+    video_format_ApplyRotation(&fmt, fmtp);
     fmt.i_chroma = chroma;
     video_format_FixRgb(&fmt);
 
     /* */
-    vd->fmt     = fmt;
+    *fmtp = fmt;
     vd->pool    = Pool;
     vd->prepare = NULL;
     vd->display = Display;
-- 
2.19.1



More information about the vlc-devel mailing list