Mercurial > libavcodec.hg
comparison libmp3lame.c @ 8569:ea663d76fcfa libavcodec
All negative values are errors not just -1.
author | michael |
---|---|
date | Sun, 11 Jan 2009 16:16:33 +0000 |
parents | 3c616a62a446 |
children | e7992bb162b2 |
comparison
equal
deleted
inserted
replaced
8568:4a93620c5aac | 8569:ea663d76fcfa |
---|---|
172 s->buffer + s->buffer_index, | 172 s->buffer + s->buffer_index, |
173 BUFFER_SIZE - s->buffer_index | 173 BUFFER_SIZE - s->buffer_index |
174 ); | 174 ); |
175 } | 175 } |
176 | 176 |
177 if(lame_result < 0){ | |
177 if(lame_result==-1) { | 178 if(lame_result==-1) { |
178 /* output buffer too small */ | 179 /* output buffer too small */ |
179 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); | 180 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); |
180 return 0; | 181 } |
182 return -1; | |
181 } | 183 } |
182 | 184 |
183 s->buffer_index += lame_result; | 185 s->buffer_index += lame_result; |
184 | 186 |
185 if(s->buffer_index<4) | 187 if(s->buffer_index<4) |