[FFmpeg-devel] [PATCH] VC-1: fix reading of custom PAR.
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sat Aug 13 11:59:53 CEST 2011
Custom PAR num/denum are coded -1.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
---
libavcodec/vc1.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index f3f266f..3cb556c 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -487,8 +487,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);
--
1.7.5.4
More information about the ffmpeg-devel
mailing list