swscale: pass/calculate sar-info, should fix #7437
authorIlkka Ollakka <ileoo@videolan.org>
Fri, 7 Sep 2012 15:03:00 +0000 (18:03 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Fri, 7 Sep 2012 15:03:56 +0000 (18:03 +0300)
modules/video_filter/croppadd.c
modules/video_filter/swscale.c

index 6bec342..bff97f8 100644 (file)
@@ -190,6 +190,9 @@ static int OpenFilter( vlc_object_t *p_this )
              p_filter->fmt_out.video.i_width,
              p_filter->fmt_out.video.i_height );
 
+    p_filter->fmt_out.video.i_sar_num = p_filter->fmt_in.video.i_sar_num * p_filter->fmt_out.video.i_visible_height;
+    p_filter->fmt_out.video.i_sar_den = p_filter->fmt_in.video.i_sar_den * p_filter->fmt_out.video.i_visible_width;
+
     return VLC_SUCCESS;
 }
 
index 632a04a..91b3d58 100644 (file)
@@ -207,6 +207,9 @@ static int OpenScaler( vlc_object_t *p_this )
              (char *)&p_filter->fmt_out.video.i_chroma,
              ppsz_mode_descriptions[i_sws_mode] );
 
+    p_filter->fmt_out.video.i_sar_num = p_filter->fmt_in.video.i_sar_num;
+    p_filter->fmt_out.video.i_sar_den = p_filter->fmt_in.video.i_sar_den;
+
     return VLC_SUCCESS;
 }