avcodec/libwebpenc: Use ff_alloc_packet2()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2015-08-02 20:58:31 +02:00
parent 06f2659891
commit 7e9cd4e100

View File

@ -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);