]> git.sesse.net Git - vlc/blobdiff - modules/codec/rawvideo.c
SAP SD: Use SCN in scanf instrad of PRI
[vlc] / modules / codec / rawvideo.c
index 27b0b0238bc510d9d76501e6b8b2c0b0c056b24d..5691eb4cd1a6e3a82eaf5cba19a69e311ddd5bec 100644 (file)
@@ -159,14 +159,15 @@ static int OpenDecoder( vlc_object_t *p_this )
     video_format_Setup( &p_dec->fmt_out.video, p_dec->fmt_in.i_codec,
                         p_dec->fmt_in.video.i_width,
                         p_dec->fmt_in.video.i_height,
-                        p_dec->fmt_in.video.i_aspect );
+                        p_dec->fmt_in.video.i_sar_num,
+                        p_dec->fmt_in.video.i_sar_den );
     p_sys->i_raw_size = p_dec->fmt_out.video.i_bits_per_pixel *
         p_dec->fmt_out.video.i_width * p_dec->fmt_out.video.i_height / 8;
 
-    if( !p_dec->fmt_in.video.i_aspect )
+    if( !p_dec->fmt_in.video.i_sar_num || !p_dec->fmt_in.video.i_sar_den )
     {
-        p_dec->fmt_out.video.i_aspect = VOUT_ASPECT_FACTOR *
-            p_dec->fmt_out.video.i_width / p_dec->fmt_out.video.i_height;
+        p_dec->fmt_out.video.i_sar_num = 1;
+        p_dec->fmt_out.video.i_sar_den = 1;
     }
 
     /* Set callbacks */
@@ -333,7 +334,7 @@ static block_t *SendFrame( decoder_t *p_dec, block_t *p_block )
         /* Fill in picture_t fields */
         picture_Setup( &pic, p_dec->fmt_out.i_codec,
                        p_dec->fmt_out.video.i_width,
-                       p_dec->fmt_out.video.i_height, VOUT_ASPECT_FACTOR );
+                       p_dec->fmt_out.video.i_height, 0, 1 );
 
         if( !pic.i_planes )
         {