[SCM] libav/experimental: All negative values are errors not just -1.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:35:04 UTC 2013


The following commit has been merged in the experimental branch:
commit 2083648383d93917d482e69dd33e46cbd8404d31
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Sun Jan 11 16:16:33 2009 +0000

    All negative values are errors not just -1.
    
    Originally committed as revision 16539 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index bccff00..af783a0 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;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list