aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-10-20 20:23:46 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-10-20 20:23:46 +0000
commit5ff85f1d8b5721a9e7f0ca6e03f61f5d3a4c3664 (patch)
tree710ea001d862c7bdb29dd0e707f9dd9eee3f2c72 /ffmpeg.c
parent9dad924e22dc0e1a09013b588b43051b5baf428d (diff)
downloadffmpeg-5ff85f1d8b5721a9e7f0ca6e03f61f5d3a4c3664.tar.gz
AVRational
sample_aspect_ratio aspect ratio in JPEG JFIF is SAR not DAR ! removed nonsense SAR guessing code various related cleanups bugs? Originally committed as revision 2403 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index a160e8abd7..a700b266f9 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2078,7 +2078,7 @@ static void opt_input_file(const char *filename)
case CODEC_TYPE_VIDEO:
frame_height = enc->height;
frame_width = enc->width;
- frame_aspect_ratio = enc->aspect_ratio;
+ frame_aspect_ratio = av_q2d(enc->sample_aspect_ratio) * enc->width / enc->height;
frame_pix_fmt = enc->pix_fmt;
rfps = ic->streams[i]->r_frame_rate;
rfps_base = ic->streams[i]->r_frame_rate_base;
@@ -2239,7 +2239,7 @@ static void opt_output_file(const char *filename)
video_enc->width = frame_width;
video_enc->height = frame_height;
- video_enc->aspect_ratio = frame_aspect_ratio;
+ video_enc->sample_aspect_ratio = av_d2q(frame_aspect_ratio*frame_height/frame_width, 30000);
video_enc->pix_fmt = frame_pix_fmt;
if (!intra_only)