Fix "-aspect" when "-pad*" is used
authorLuca Abeni <lucabe72@email.it>
Sat, 5 Aug 2006 12:54:16 +0000 (12:54 +0000)
committerLuca Abeni <lucabe72@email.it>
Sat, 5 Aug 2006 12:54:16 +0000 (12:54 +0000)
Originally committed as revision 5935 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffmpeg.c

index 72e898af9f18def481487779c0d3aafd060df574..022ebfe17248601f6cc4e4d5a8511341343d45ee 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3032,7 +3032,7 @@ static void new_video_stream(AVFormatContext *oc)
 
         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*frame_height/frame_width, 255);
+        video_enc->sample_aspect_ratio = av_d2q(frame_aspect_ratio*video_enc->height/video_enc->width, 255);
         video_enc->pix_fmt = frame_pix_fmt;
 
         if(codec && codec->pix_fmts){