[vlc-commits] commit: Used video_format_ScaleCropAr in scale.c/swscale.c (Laurent Aimar )

git at videolan.org git at videolan.org
Fri Nov 26 22:37:43 CET 2010


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Nov 13 20:41:36 2010 +0100| [21e527a0498ce864c682525bf175ee38e64e038c] | committer: Laurent Aimar 

Used video_format_ScaleCropAr in scale.c/swscale.c

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

 modules/video_filter/scale.c   |    3 +++
 modules/video_filter/swscale.c |    3 ++-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/modules/video_filter/scale.c b/modules/video_filter/scale.c
index 0f72c5b..66384db 100644
--- a/modules/video_filter/scale.c
+++ b/modules/video_filter/scale.c
@@ -67,6 +67,7 @@ static int OpenFilter( vlc_object_t *p_this )
         return VLC_EGENERIC;
     }
 
+    video_format_ScaleCropAr( &p_filter->fmt_out.video, &p_filter->fmt_in.video );
     p_filter->pf_video_filter = Filter;
 
     msg_Dbg( p_filter, "%ix%i -> %ix%i", p_filter->fmt_in.video.i_width,
@@ -94,6 +95,8 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
         (p_filter->fmt_out.video.i_width == 0) )
         return NULL;
 
+    video_format_ScaleCropAr( &p_filter->fmt_out.video, &p_filter->fmt_in.video );
+
     /* Request output picture */
     p_pic_dst = filter_NewPicture( p_filter );
     if( !p_pic_dst )
diff --git a/modules/video_filter/swscale.c b/modules/video_filter/swscale.c
index ffa2b1d..b60c5f6 100644
--- a/modules/video_filter/swscale.c
+++ b/modules/video_filter/swscale.c
@@ -347,7 +347,7 @@ static int Init( filter_t *p_filter )
 {
     filter_sys_t *p_sys = p_filter->p_sys;
     const video_format_t *p_fmti = &p_filter->fmt_in.video;
-    const video_format_t *p_fmto = &p_filter->fmt_out.video;
+    video_format_t       *p_fmto = &p_filter->fmt_out.video;
 
     if( IsFmtSimilar( p_fmti, &p_sys->fmt_in ) &&
         IsFmtSimilar( p_fmto, &p_sys->fmt_out ) &&
@@ -424,6 +424,7 @@ static int Init( filter_t *p_filter )
     p_sys->b_swap_uvi = cfg.b_swap_uvi;
     p_sys->b_swap_uvo = cfg.b_swap_uvo;
 
+    video_format_ScaleCropAr( p_fmto, p_fmti );
 #if 0
     msg_Dbg( p_filter, "%ix%i chroma: %4.4s -> %ix%i chroma: %4.4s extend by %d",
              p_fmti->i_width, p_fmti->i_height, (char *)&p_fmti->i_chroma,



More information about the vlc-commits mailing list