Commit c038fb41 authored by Michael Niedermayer's avatar Michael Niedermayer

targaenc: switch to ff_alloc_packet2().

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent dbb11e7d
...@@ -86,8 +86,7 @@ static int targa_encode_frame(AVCodecContext *avctx, AVPacket *pkt, ...@@ -86,8 +86,7 @@ static int targa_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
picsize = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height); picsize = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height);
if ((ret = ff_alloc_packet(pkt, picsize + 45)) < 0) { if ((ret = ff_alloc_packet2(avctx, pkt, picsize + 45)) < 0) {
av_log(avctx, AV_LOG_ERROR, "encoded frame too large\n");
return ret; return ret;
} }
......
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