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

Ilkka Ollakka git at videolan.org
Fri Sep 7 17:16:14 CEST 2012


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

swscale: pass/calculate sar-info, should fix #7437
(cherry picked from commit 0f233f4980d0440b8357de629fee7fa0741c27b3)

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

 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 3072637..6381114 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 278dccf..a1765c3 100644
--- a/modules/video_filter/swscale.c
+++ b/modules/video_filter/swscale.c
@@ -208,6 +208,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