sonicenc: limit quant so that golomb codes are less than 32 bits long

before they could become 33 bits

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-09-18 17:33:55 +02:00
parent efac6f7472
commit 512beea529
1 changed files with 2 additions and 2 deletions

View File

@ -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);