Commit c7ef5a4a authored by Michael Niedermayer's avatar Michael Niedermayer

libmp3lame: switch to ff_alloc_packet2().

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 67b8c88c
......@@ -255,8 +255,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_packet(avpkt, len))) {
av_log(avctx, AV_LOG_ERROR, "Error getting output packet\n");
if ((ret = ff_alloc_packet2(avctx, avpkt, len))) {
return ret;
}
memcpy(avpkt->data, s->buffer, len);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment