[FFmpeg-devel] [PATCH] change frame_aspect_ratio to AVRational

Baptiste Coudurier baptiste.coudurier
Thu Jun 11 06:28:07 CEST 2009


On 6/10/2009 9:23 PM, Baptiste Coudurier wrote:
> Hi
> 
> $subject, mainly to avoid using double which behaves not correctly
> when using 16:9 commandline.
> 
> [...]
>
> @@ -3039,7 +3040,8 @@
>  
>          video_enc->width = frame_width + frame_padright + frame_padleft;
>          video_enc->height = frame_height + frame_padtop + frame_padbottom;
> -        video_enc->sample_aspect_ratio = av_d2q(frame_aspect_ratio*video_enc->height/video_enc->width, 255);
> +        video_enc->sample_aspect_ratio =
> +            av_mul_q(frame_aspect_ratio, (AVRational){ frame_height, frame_width });
>          video_enc->pix_fmt = frame_pix_fmt;
>          st->sample_aspect_ratio = video_enc->sample_aspect_ratio;
>  

Sorry, read { video_enc->height, video_enc->width }

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org



More information about the ffmpeg-devel mailing list