[FFmpeg-cvslog] wmaenc: fix off by 1 error in quantization loop
Michael Niedermayer
git at videolan.org
Sat Jun 30 20:48:27 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jun 30 19:38:11 2012 +0200| [799df083f3196d96ead6ea4400426dbd178573b1] | committer: Michael Niedermayer
wmaenc: fix off by 1 error in quantization loop
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=799df083f3196d96ead6ea4400426dbd178573b1
---
libavcodec/wmaenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/wmaenc.c b/libavcodec/wmaenc.c
index 93522af..360902a 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
More information about the ffmpeg-cvslog
mailing list