Fix scaling of subpicture in fb video_output.
authorJean-Paul Saman <jpsaman@videolan.org>
Fri, 25 Jan 2008 19:49:45 +0000 (19:49 +0000)
committerJean-Paul Saman <jpsaman@videolan.org>
Fri, 25 Jan 2008 19:49:45 +0000 (19:49 +0000)
modules/video_output/fb.c

index 2667fd1..199c3b8 100644 (file)
@@ -483,6 +483,7 @@ static int Init( vout_thread_t *p_vout )
 
     I_OUTPUTPICTURES = 0;
 
+    p_vout->fmt_out = p_vout->fmt_in;
     if( p_sys->i_chroma == 0 )
     {
         /* Initialize the output structure: RGB with square pixels, whatever
@@ -526,8 +527,8 @@ static int Init( vout_thread_t *p_vout )
         p_vout->render.i_width = p_sys->i_width;
         p_vout->render.i_height = p_sys->i_height;
     }
-    p_vout->output.i_width  = p_sys->i_width;
-    p_vout->output.i_height = p_sys->i_height;
+    p_vout->output.i_width  = p_vout->fmt_out.i_width = p_sys->i_width;
+    p_vout->output.i_height = p_vout->fmt_out.i_height = p_sys->i_height;
 
     /* Assume we have square pixels */
     if( p_sys->i_aspect < 0 )
@@ -539,6 +540,7 @@ static int Init( vout_thread_t *p_vout )
 
     p_vout->fmt_out.i_sar_num = p_vout->fmt_out.i_sar_den = 1;
     p_vout->fmt_out.i_aspect  = p_vout->render.i_aspect = p_vout->output.i_aspect;
+    p_vout->fmt_out.i_x_offset= p_vout->fmt_out.i_y_offset = 0;
 
     /* Clear the screen */
     memset( p_sys->p_video, 0, p_sys->i_page_size );