]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/wall.c
Use var_InheritString for --decklink-video-connection.
[vlc] / modules / video_filter / wall.c
index aa65b686bb9a718113ddaf125e4218cb887b1b69..12141c547bd3f09cc1f6856c7bf68f093a0a2576 100644 (file)
@@ -32,7 +32,7 @@
 
 #include <vlc_common.h>
 #include <vlc_plugin.h>
-#include "vlc_video_splitter.h"
+#include <vlc_video_splitter.h>
 
 /* FIXME it is needed for VOUT_ALIGN_* only */
 #include <vlc_vout.h>
@@ -104,7 +104,7 @@ struct video_splitter_sys_t
     int           i_col;
     int           i_row;
     int           i_output;
-    wall_output_t pp_output[ROW_MAX][COL_MAX]; /* [x][y] */
+    wall_output_t pp_output[COL_MAX][ROW_MAX]; /* [x][y] */
 };
 
 static int Filter( video_splitter_t *, picture_t *pp_dst[], picture_t * );
@@ -156,6 +156,8 @@ static int Open( vlc_object_t *p_this )
         const int i_index = atoi( psz_tmp );
         if( i_index >= 0 && i_index < COL_MAX*ROW_MAX )
             pb_active[i_index] = true;
+
+        psz_tmp = psz_next;
     }
     free( psz_state );
 
@@ -349,8 +351,8 @@ static int Open( vlc_object_t *p_this )
             p_cfg->fmt.i_width          = p_output->i_width;
             p_cfg->fmt.i_visible_height =
             p_cfg->fmt.i_height         = p_output->i_height;
-            p_cfg->fmt.i_aspect         = (int64_t)i_aspect * i_target_height * p_output->i_width / i_target_width / p_output->i_height;
-
+            p_cfg->fmt.i_sar_num        = (int64_t)i_aspect * i_target_height;
+            p_cfg->fmt.i_sar_den        = VOUT_ASPECT_FACTOR * i_target_width;
             p_cfg->window.i_x     = p_output->i_left; /* FIXME relative to video-x/y (TODO in wrapper.c) ? */
             p_cfg->window.i_y     = p_output->i_top;
             p_cfg->window.i_align = p_output->i_align;
@@ -382,7 +384,10 @@ static int Filter( video_splitter_t *p_splitter, picture_t *pp_dst[], picture_t
     video_splitter_sys_t *p_sys = p_splitter->p_sys;
 
     if( video_splitter_NewPicture( p_splitter, pp_dst ) )
+    {
+        picture_Release( p_src );
         return VLC_EGENERIC;
+    }
 
     for( int y = 0; y < p_sys->i_row; y++ )
     {
@@ -392,7 +397,6 @@ static int Filter( video_splitter_t *p_splitter, picture_t *pp_dst[], picture_t
             if( !p_output->b_active )
                 continue;
 
-            video_splitter_output_t *p_cfg = &p_splitter->p_output[p_output->i_output];
             picture_t *p_dst = pp_dst[p_output->i_output];
 
             /* */
@@ -417,13 +421,14 @@ static int Mouse( video_splitter_t *p_splitter, vlc_mouse_t *p_mouse,
                   int i_index,
                   const vlc_mouse_t *p_old, const vlc_mouse_t *p_new )
 {
+    VLC_UNUSED(p_old);
     video_splitter_sys_t *p_sys = p_splitter->p_sys;
 
     for( int y = 0; y < p_sys->i_row; y++ )
     {
         for( int x = 0; x < p_sys->i_col; x++ )
         {
-            wall_output_t *p_output = p_output = &p_sys->pp_output[x][y];
+            wall_output_t *p_output = &p_sys->pp_output[x][y];
             if( p_output->b_active && p_output->i_output == i_index )
             {
                 *p_mouse = *p_new;