# HG changeset patch # User michael # Date 1231690593 0 # Node ID ea663d76fcfa3e6bd8dda43a14046c2a9eaeb5ab # Parent 4a93620c5aac53c3a240b726a1b72cc262f2a050 All negative values are errors not just -1. diff -r 4a93620c5aac -r ea663d76fcfa libmp3lame.c --- 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;