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>
pull/28/head
Michael Niedermayer 13 years ago
parent efac6f7472
commit 512beea529
  1. 4
      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);

Loading…
Cancel
Save