summaryrefslogtreecommitdiff
path: root/libavcodec/wmaenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-06-30 19:38:11 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-06-30 19:38:11 +0200
commit799df083f3196d96ead6ea4400426dbd178573b1 (patch)
treeb97f7af5768ddbfc64f0d462c997fc4c442de91a /libavcodec/wmaenc.c
parente704ab3d5f390c3ee07762b84eab55bf6fb7aca1 (diff)
wmaenc: fix off by 1 error in quantization loop
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/wmaenc.c')
-rw-r--r--libavcodec/wmaenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wmaenc.c b/libavcodec/wmaenc.c
index 93522af91f..360902a5c8 100644
--- a/libavcodec/wmaenc.c
+++ b/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