summaryrefslogtreecommitdiff
path: root/libavcodec/sonic.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-09-18 17:33:55 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-09-18 17:33:55 +0200
commit512beea52936f5935a0c6cdaef18364520ea5b7c (patch)
treeb754bdbae9817313c623341d93c5963cbd4c36de /libavcodec/sonic.c
parentefac6f7472c4c372cd336dd88cf8a1ed363cccd6 (diff)
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>
Diffstat (limited to 'libavcodec/sonic.c')
-rw-r--r--libavcodec/sonic.c4
1 files changed, 2 insertions, 2 deletions
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);