mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-08-22 09:15:06 +02:00
utvideoenc: Port to ff_alloc_packet2
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
67308bd66b
commit
18263698ab
@ -623,15 +623,11 @@ static int utvideo_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
int i, ret = 0;
|
int i, ret = 0;
|
||||||
|
|
||||||
/* Allocate a new packet if needed, and set it to the pointer dst */
|
/* Allocate a new packet if needed, and set it to the pointer dst */
|
||||||
ret = ff_alloc_packet(pkt, (256 + 4 * c->slices + width * height) *
|
ret = ff_alloc_packet2(avctx, pkt, (256 + 4 * c->slices + width * height) *
|
||||||
c->planes + 4);
|
c->planes + 4);
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0)
|
||||||
av_log(avctx, AV_LOG_ERROR,
|
|
||||||
"Error allocating the output packet, or the provided packet "
|
|
||||||
"was too small.\n");
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
|
||||||
|
|
||||||
dst = pkt->data;
|
dst = pkt->data;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user