[vlc-commits] swscale: pass/calculate sar-info, should fix #7437

Ilkka Ollakka git at videolan.org
Fri Sep 7 17:09:28 CEST 2012


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Fri Sep  7 18:03:00 2012 +0300| [0f233f4980d0440b8357de629fee7fa0741c27b3] | committer: Ilkka Ollakka

swscale: pass/calculate sar-info, should fix #7437

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0f233f4980d0440b8357de629fee7fa0741c27b3
---

 modules/video_filter/croppadd.c |    3 +++
 modules/video_filter/swscale.c  |    3 +++
 2 files changed, 6 insertions(+)

diff --git a/modules/video_filter/croppadd.c b/modules/video_filter/croppadd.c
index 6bec342..bff97f8 100644
--- a/modules/video_filter/croppadd.c
+++ b/modules/video_filter/croppadd.c
@@ -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;
 }
 
diff --git a/modules/video_filter/swscale.c b/modules/video_filter/swscale.c
index 632a04a..91b3d58 100644
--- a/modules/video_filter/swscale.c
+++ b/modules/video_filter/swscale.c
@@ -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;
 }
 



More information about the vlc-commits mailing list