[vlc-commits] vout: vmem: refactor for next changes

Thomas Guillem git at videolan.org
Tue Nov 27 15:48:48 CET 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sun Oct 28 15:56:00 2018 +0100| [cd476ffd49a316c62c8f9f0522b4e3d948c92e64] | committer: Steve Lhomme

vout: vmem: refactor for next changes

vd->fmt and vd->cfg will be removed.
fmt and cfg will be passed by Open() and controls.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cd476ffd49a316c62c8f9f0522b4e3d948c92e64
---

 modules/video_output/vmem.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/vmem.c b/modules/video_output/vmem.c
index 41636f5d3a..5fc337f5c7 100644
--- a/modules/video_output/vmem.c
+++ b/modules/video_output/vmem.c
@@ -117,6 +117,7 @@ static int            Control(vout_display_t *, int, va_list);
 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 = malloc(sizeof(*sys));
     if (unlikely(!sys))
         return VLC_ENOMEM;
@@ -138,7 +139,7 @@ static int Open(vlc_object_t *object)
 
     /* Define the video format */
     video_format_t fmt;
-    video_format_ApplyRotation(&fmt, &vd->fmt);
+    video_format_ApplyRotation(&fmt, fmtp);
 
     if (setup != NULL) {
         char chroma[5];
@@ -209,8 +210,9 @@ static int Open(vlc_object_t *object)
     }
 
     /* */
+    *fmtp = fmt;
+
     vd->sys     = sys;
-    vd->fmt     = fmt;
     vd->pool    = Pool;
     vd->prepare = Prepare;
     vd->display = Display;



More information about the vlc-commits mailing list