]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/clone.c
* include/video_output.h, ALL: changed api for vout_Request()/vout_Create() to be...
[vlc] / modules / video_filter / clone.c
index f274512c571e64c10721c2ee69f28949f45a5bc6..ceb5b1542fd430fd26ed36e4d9a47acc5f962271 100644 (file)
@@ -205,6 +205,7 @@ static int Init( vout_thread_t *p_vout )
     int   i_index, i_vout;
     picture_t *p_pic;
     char *psz_default_vout;
+    video_format_t fmt = {0};
 
     I_OUTPUTPICTURES = 0;
 
@@ -214,6 +215,14 @@ static int Init( vout_thread_t *p_vout )
     p_vout->output.i_height = p_vout->render.i_height;
     p_vout->output.i_aspect = p_vout->render.i_aspect;
 
+    fmt.i_width = fmt.i_visible_width = p_vout->render.i_width;
+    fmt.i_height = fmt.i_visible_height = p_vout->render.i_height;
+    fmt.i_x_offset = fmt.i_y_offset = 0;
+    fmt.i_chroma = p_vout->render.i_chroma;
+    fmt.i_aspect = p_vout->render.i_aspect;
+    fmt.i_sar_num = p_vout->render.i_aspect * fmt.i_height / fmt.i_width;
+    fmt.i_sar_den = VOUT_ASPECT_FACTOR;
+
     /* Try to open the real video output */
     msg_Dbg( p_vout, "spawning the real video outputs" );
 
@@ -227,9 +236,7 @@ static int Init( vout_thread_t *p_vout )
                            "default", 8 ) ) )
         {
             p_vout->p_sys->pp_vout[i_vout] =
-                vout_Create( p_vout, p_vout->render.i_width,
-                             p_vout->render.i_height, p_vout->render.i_chroma, 
-                             p_vout->render.i_aspect );
+                vout_Create( p_vout, &fmt );
         }
         else
         {
@@ -237,9 +244,7 @@ static int Init( vout_thread_t *p_vout )
             config_PutPsz( p_vout, "vout",
                            p_vout->p_sys->ppsz_vout_list[i_vout] );
             p_vout->p_sys->pp_vout[i_vout] =
-                vout_Create( p_vout, p_vout->render.i_width,
-                             p_vout->render.i_height, p_vout->render.i_chroma, 
-                             p_vout->render.i_aspect );
+                vout_Create( p_vout, &fmt );
 
             /* Reset the default value */
             config_PutPsz( p_vout, "vout", psz_default_vout );