From: Michael Niedermayer Date: Tue, 18 Sep 2012 15:33:55 +0000 (+0200) Subject: sonicenc: limit quant so that golomb codes are less than 32 bits long X-Git-Tag: android-x86-4.4-r1~9421 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=512beea52936f5935a0c6cdaef18364520ea5b7c;p=android-x86%2Fexternal-ffmpeg.git sonicenc: limit quant so that golomb codes are less than 32 bits long before they could become 33 bits Signed-off-by: Michael Niedermayer --- diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c index acd7412d9b..d412d60391 100644 --- a/libavcodec/sonic.c +++ b/libavcodec/sonic.c @@ -724,8 +724,8 @@ static int sonic_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, if (quant < 1) quant = 1; - if (quant > 65535) - quant = 65535; + if (quant > 65534) + quant = 65534; set_ue_golomb(&pb, quant);