diff --git a/libavcodec/libwebpenc.c b/libavcodec/libwebpenc.c index db96e1637b..0bcf628e58 100644 --- a/libavcodec/libwebpenc.c +++ b/libavcodec/libwebpenc.c @@ -57,7 +57,7 @@ static int libwebp_encode_frame(AVCodecContext *avctx, AVPacket *pkt, goto end; } - ret = ff_alloc_packet(pkt, mw.size); + ret = ff_alloc_packet2(avctx, pkt, mw.size, mw.size); if (ret < 0) goto end; memcpy(pkt->data, mw.mem, mw.size);