Commit 799df083 authored by Michael Niedermayer's avatar Michael Niedermayer

wmaenc: fix off by 1 error in quantization loop

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent e704ab3d
......@@ -379,7 +379,7 @@ static int encode_superframe(AVCodecContext *avctx, AVPacket *avpkt,
for(i=64; i; i>>=1){
int error = encode_frame(s, s->coefs, avpkt->data, avpkt->size,
total_gain - i);
if(error<0)
if(error<=0)
total_gain-= i;
}
#else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment