Commit 18263698 authored by Derek Buitenhuis's avatar Derek Buitenhuis Committed by Michael Niedermayer

utvideoenc: Port to ff_alloc_packet2

Signed-off-by: 's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 67308bd6
......@@ -623,15 +623,11 @@ static int utvideo_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
int i, ret = 0;
/* Allocate a new packet if needed, and set it to the pointer dst */
ret = ff_alloc_packet(pkt, (256 + 4 * c->slices + width * height) *
c->planes + 4);
ret = ff_alloc_packet2(avctx, pkt, (256 + 4 * c->slices + width * height) *
c->planes + 4);
if (ret < 0) {
av_log(avctx, AV_LOG_ERROR,
"Error allocating the output packet, or the provided packet "
"was too small.\n");
if (ret < 0)
return ret;
}
dst = pkt->data;
......
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