diff --git a/libavcodec/mpegaudioenc.c b/libavcodec/mpegaudioenc.c index 1f9516d2e9..5a4dc2af37 100644 --- a/libavcodec/mpegaudioenc.c +++ b/libavcodec/mpegaudioenc.c @@ -751,8 +751,7 @@ static int MPA_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, } compute_bit_allocation(s, smr, bit_alloc, &padding); - if ((ret = ff_alloc_packet(avpkt, MPA_MAX_CODED_FRAME_SIZE))) { - av_log(avctx, AV_LOG_ERROR, "Error getting output packet\n"); + if ((ret = ff_alloc_packet2(avctx, avpkt, MPA_MAX_CODED_FRAME_SIZE))) { return ret; }