Browse Source

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>
tags/n1.0
Michael Niedermayer 13 years ago
parent
commit
512beea529
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/sonic.c

+ 2
- 2
libavcodec/sonic.c 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);



Loading…
Cancel
Save