summaryrefslogtreecommitdiff
path: root/libavcodec/libmp3lame.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/libmp3lame.c')
-rw-r--r--libavcodec/libmp3lame.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index 034fee73a9..e60856c10b 100644
--- a/libavcodec/libmp3lame.c
+++ b/libavcodec/libmp3lame.c
@@ -254,7 +254,7 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
av_dlog(avctx, "in:%d packet-len:%d index:%d\n", avctx->frame_size, len,
s->buffer_index);
if (len <= s->buffer_index) {
- if ((ret = ff_alloc_packet2(avctx, avpkt, len)))
+ if ((ret = ff_alloc_packet2(avctx, avpkt, len)) < 0)
return ret;
memcpy(avpkt->data, s->buffer, len);
s->buffer_index -= len;