wmaenc: fix off by 1 error in quantization loop

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-06-30 19:38:11 +02:00
parent e704ab3d5f
commit 799df083f3

View File

@ -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