aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2011-08-13 11:58:18 +0200
committerDiego Biurrun <diego@biurrun.de>2011-08-15 16:36:58 +0200
commit0e8696551414d4ea0aab2559f9475d1fe49d08f3 (patch)
treed49dd7dad3b81a17e49c9274684e5997095fce88 /libavcodec
parente9fb7636114f2d3b99734abaf5136f6c4f1b3db9 (diff)
downloadffmpeg-0e8696551414d4ea0aab2559f9475d1fe49d08f3.tar.gz
VC-1: fix reading of custom PAR.
Custom PAR num/denum are in 1-256 range. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vc1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index 1f83dd27b8..243bef5bb8 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -485,8 +485,8 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb)
if(ar && ar < 14){
v->s.avctx->sample_aspect_ratio = ff_vc1_pixel_aspect[ar];
}else if(ar == 15){
- w = get_bits(gb, 8);
- h = get_bits(gb, 8);
+ w = get_bits(gb, 8) + 1;
+ h = get_bits(gb, 8) + 1;
v->s.avctx->sample_aspect_ratio = (AVRational){w, h};
}
av_log(v->s.avctx, AV_LOG_DEBUG, "Aspect: %i:%i\n", v->s.avctx->sample_aspect_ratio.num, v->s.avctx->sample_aspect_ratio.den);