changeset 8569:ea663d76fcfa libavcodec

All negative values are errors not just -1.
author michael
date Sun, 11 Jan 2009 16:16:33 +0000
parents 4a93620c5aac
children e7992bb162b2
files libmp3lame.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmp3lame.c	Sun Jan 11 10:50:00 2009 +0000
+++ b/libmp3lame.c	Sun Jan 11 16:16:33 2009 +0000
@@ -174,10 +174,12 @@
                 );
     }
 
+    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;