wmaenc: fix off by 1 error in quantization loop

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/59/head
Michael Niedermayer 13 years ago
parent e704ab3d5f
commit 799df083f3
  1. 2
      libavcodec/wmaenc.c

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

Loading…
Cancel
Save