[SCM] libav/experimental: Off-by-one error fix

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:55:31 UTC 2013


The following commit has been merged in the experimental branch:
commit 14f3f3a1ad9aca7599bdaa399cdb8680c52dc696
Author: Kostya Shishkov <kostya.shishkov at gmail.com>
Date:   Wed Jan 24 17:49:26 2007 +0000

    Off-by-one error fix
    
    Originally committed as revision 7694 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index ceb534e..10f5d22 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -1283,8 +1283,8 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb)
     if(get_bits1(gb)) { //Display Info - decoding is not affected by it
         int w, h, ar = 0;
         av_log(v->s.avctx, AV_LOG_INFO, "Display extended info:\n");
-        w = get_bits(gb, 14);
-        h = get_bits(gb, 14);
+        w = get_bits(gb, 14) + 1;
+        h = get_bits(gb, 14) + 1;
         av_log(v->s.avctx, AV_LOG_INFO, "Display dimensions: %ix%i\n", w, h);
         //TODO: store aspect ratio in AVCodecContext
         if(get_bits1(gb))

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list