1
From 28321b777f76528b061646a3555d08b94ff667bc Mon Sep 17 00:00:00 2001
2
From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= <Reimar.Doeffinger@gmx.de>
3
Date: Sat, 13 Aug 2011 11:58:18 +0200
4
Subject: [PATCH 30/70] VC-1: fix reading of custom PAR.
6
Content-Type: text/plain; charset=UTF-8
7
Content-Transfer-Encoding: 8bit
9
Custom PAR num/denum are in 1-256 range.
11
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13
(cherry picked from commit 0e8696551414d4ea0aab2559f9475d1fe49d08f3)
15
Signed-off-by: Anton Khirnov <anton@khirnov.net>
17
libavcodec/vc1.c | 4 ++--
18
1 files changed, 2 insertions(+), 2 deletions(-)
20
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
21
index 32869b9..5e53680 100644
22
--- a/libavcodec/vc1.c
23
+++ b/libavcodec/vc1.c
24
@@ -485,8 +485,8 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb)
26
v->s.avctx->sample_aspect_ratio = ff_vc1_pixel_aspect[ar];
28
- w = get_bits(gb, 8);
29
- h = get_bits(gb, 8);
30
+ w = get_bits(gb, 8) + 1;
31
+ h = get_bits(gb, 8) + 1;
32
v->s.avctx->sample_aspect_ratio = (AVRational){w, h};
34
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);