diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2011-08-13 13:58:18 +0400 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2011-12-24 15:20:32 +0400 |
commit | f4a5a730d8e091534ab58f6b2557374b913815ab (patch) | |
tree | 52a719e851f3821be2ac6643fbfbf2b9a8ff7edd /libavcodec | |
parent | 36c196bca4be68f8ebf04bf2ac9b972d4f084b9f (diff) |
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>
(cherry picked from commit 0e8696551414d4ea0aab2559f9475d1fe49d08f3)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vc1.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index 7d00072b7a..1ed79af0bd 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -467,8 +467,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); |