[vlc-devel] [vlc-commits] swscale: fix aspect-ratio problem properly

Rémi Denis-Courmont remi at remlab.net
Sun Nov 25 18:19:51 CET 2012


Le dimanche 25 novembre 2012 19:15:20, Ilkka Ollakka a écrit :
> diff --git a/modules/video_filter/swscale.c
> b/modules/video_filter/swscale.c index 7b3d791..7854a30 100644
> --- a/modules/video_filter/swscale.c
> +++ b/modules/video_filter/swscale.c
> @@ -207,8 +207,8 @@ 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;
> +    p_filter->fmt_out.video.i_sar_num = p_filter->fmt_in.video.i_sar_num *
> p_filter->fmt_in.video.i_width / p_filter->fmt_out.video.i_width; +   
> p_filter->fmt_out.video.i_sar_den = p_filter->fmt_in.video.i_sar_den *
> p_filter->fmt_in.video.i_height / p_filter->fmt_out.video.i_height;

This does not look right. I don't think the output format is always a multiple 
of the input format.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list