diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-10-30 19:55:44 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-10-30 19:55:44 +0000 |
commit | f259747bc704704db7f299ddd5821280c3c4c7b3 (patch) | |
tree | d6c82bb7a32255fe17207eb630691b35626d0dc9 /libavcodec/mpeg12.c | |
parent | 5f1948111a4920ff74e31b4284ab0200f7938539 (diff) | |
download | ffmpeg-f259747bc704704db7f299ddd5821280c3c4c7b3.tar.gz |
100l (SAR is written as height/width instead of width/height in the MPEG1 standard)
Originally committed as revision 2453 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r-- | libavcodec/mpeg12.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 8eca32c626..8a5fd22c90 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -223,7 +223,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s) for(i=1; i<15; i++){ float error= aspect_ratio; if(s->codec_id == CODEC_ID_MPEG1VIDEO || i <=1) - error-= mpeg1_aspect[i]; + error-= 1.0/mpeg1_aspect[i]; else error-= av_q2d(mpeg2_aspect[i])*s->height/s->width; @@ -2278,7 +2278,7 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx, height = get_bits(&s->gb, 12); s->aspect_ratio_info= get_bits(&s->gb, 4); if(s->codec_id == CODEC_ID_MPEG1VIDEO){ - aspect= mpeg1_aspect[s->aspect_ratio_info]; + aspect= 1.0/mpeg1_aspect[s->aspect_ratio_info]; if(aspect!=0.0) avctx->sample_aspect_ratio= av_d2q(aspect, 255); } |