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