avcodec/libwebpenc_animencoder: Use ff_alloc_packet2()
authorMichael Niedermayer <michael@niedermayer.cc>
Mon, 3 Aug 2015 11:20:41 +0000 (13:20 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 3 Aug 2015 12:31:03 +0000 (14:31 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/libwebpenc_animencoder.c

index e050647..d7437a9 100644 (file)
@@ -66,7 +66,7 @@ static int libwebp_anim_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
             WebPData assembled_data = { 0 };
             ret = WebPAnimEncoderAssemble(s->enc, &assembled_data);
             if (ret) {
-                ret = ff_alloc_packet(pkt, assembled_data.size);
+                ret = ff_alloc_packet2(avctx, pkt, assembled_data.size, assembled_data.size);
                 if (ret < 0)
                     return ret;
                 memcpy(pkt->data, assembled_data.bytes, assembled_data.size);