[vlc-commits] decklink output: use variable

Rafaël Carré git at videolan.org
Mon Nov 21 17:46:36 CET 2016


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Fri Apr 11 10:44:49 2014 +0200| [081fcde974df6e67838ea91b63cacefdf5160e2e] | committer: Francois Cartegnie

decklink output: use variable

Signed-off-by: Francois Cartegnie <fcvlcdev at free.fr>

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

 modules/video_output/decklink.cpp | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/modules/video_output/decklink.cpp b/modules/video_output/decklink.cpp
index eb98bc7..5f57c0c 100644
--- a/modules/video_output/decklink.cpp
+++ b/modules/video_output/decklink.cpp
@@ -907,6 +907,7 @@ static int ControlVideo(vout_display_t *vd, int query, va_list args)
 static int OpenVideo(vlc_object_t *p_this)
 {
     vout_display_t *vd = (vout_display_t *)p_this;
+    video_format_t *fmt = &vd->fmt;
     vout_display_sys_t *sys;
     struct decklink_sys_t *decklink_sys;
 
@@ -930,13 +931,13 @@ static int OpenVideo(vlc_object_t *p_this)
 
     sys->pool = NULL;
 
-    vd->fmt.i_chroma = sys->tenbits
+    fmt->i_chroma = sys->tenbits
         ? VLC_CODEC_I422_10L /* we will convert to v210 */
         : VLC_CODEC_UYVY;
-    //video_format_FixRgb(&(vd->fmt));
+    //video_format_FixRgb(fmt);
 
-    vd->fmt.i_width = decklink_sys->i_width;
-    vd->fmt.i_height = decklink_sys->i_height;
+    fmt->i_width = decklink_sys->i_width;
+    fmt->i_height = decklink_sys->i_height;
 
     char *pic_file = var_InheritString(p_this, VIDEO_CFG_PREFIX "nosignal-image");
     if (pic_file) {
@@ -947,15 +948,15 @@ static int OpenVideo(vlc_object_t *p_this)
             video_format_t in, dummy;
 
             video_format_Init(&in, 0);
-            video_format_Setup(&in, 0, vd->fmt.i_width, vd->fmt.i_height,
-                    vd->fmt.i_width, vd->fmt.i_height, 1, 1);
+            video_format_Setup(&in, 0, fmt->i_width, fmt->i_height,
+                               fmt->i_width, fmt->i_height, 1, 1);
 
             video_format_Init(&dummy, 0);
 
             picture_t *png = image_ReadUrl(img, pic_file, &dummy, &in);
             if (png) {
                 msg_Err(p_this, "Converting");
-                sys->pic_nosignal = image_Convert(img, png, &in, &vd->fmt);
+                sys->pic_nosignal = image_Convert(img, png, &in, fmt);
                 picture_Release(png);
             }
 



More information about the vlc-commits mailing list