diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2009-01-11 16:16:33 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2009-01-11 16:16:33 +0000 |
commit | 2083648383d93917d482e69dd33e46cbd8404d31 (patch) | |
tree | 54460a6612e54e7bd61e8d894fd62ad7d0743f19 | |
parent | 528271ff670651d475cba05aff4ac144977b6296 (diff) | |
download | ffmpeg-2083648383d93917d482e69dd33e46cbd8404d31.tar.gz |
All negative values are errors not just -1.
Originally committed as revision 16539 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/libmp3lame.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c index bccff00b0e..af783a0651 100644 --- a/libavcodec/libmp3lame.c +++ b/libavcodec/libmp3lame.c @@ -174,10 +174,12 @@ static int MP3lame_encode_frame(AVCodecContext *avctx, ); } + if(lame_result < 0){ if(lame_result==-1) { /* output buffer too small */ av_log(avctx, AV_LOG_ERROR, "lame: output buffer too small (buffer index: %d, free bytes: %d)\n", s->buffer_index, BUFFER_SIZE - s->buffer_index); - return 0; + } + return -1; } s->buffer_index += lame_result; |