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

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


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

vout: vdummy: 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=05e13da8626fd68ef35a8c883eb481b6254d94ed
---

 modules/video_output/vdummy.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/vdummy.c b/modules/video_output/vdummy.c
index 46bcf8ec23..deef545f89 100644
--- a/modules/video_output/vdummy.c
+++ b/modules/video_output/vdummy.c
@@ -79,6 +79,7 @@ static int Open(vlc_object_t *object,
                 void (*display)(vout_display_t *, picture_t *))
 {
     vout_display_t *vd = (vout_display_t *)object;
+    video_format_t *fmt = &vd->fmt;
     vout_display_sys_t *sys;
 
     vd->sys = sys = calloc(1, sizeof(*sys));
@@ -93,7 +94,7 @@ static int Open(vlc_object_t *object,
         vlc_fourcc_t fcc = vlc_fourcc_GetCodecFromString(VIDEO_ES, chroma);
         if (fcc != 0) {
             msg_Dbg(vd, "forcing chroma 0x%.8x (%4.4s)", fcc, (char*)&fcc);
-            vd->fmt.i_chroma = fcc;
+            fmt->i_chroma = fcc;
         }
         free(chroma);
     }
@@ -139,7 +140,7 @@ static void DisplayStat(vout_display_t *vd, picture_t *picture)
 
     VLC_UNUSED(vd);
 
-    if (vd->fmt.i_width * vd->fmt.i_height >= sizeof (vlc_tick_t)
+    if (picture->format.i_width * picture->format.i_height >= sizeof (vlc_tick_t)
      && (p->i_pitch * p->i_lines) >= (ssize_t)sizeof (vlc_tick_t)) {
         vlc_tick_t date;
         memcpy(&date, p->p_pixels, sizeof(date));



More information about the vlc-commits mailing list