diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2012-08-20 14:07:41 -0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-08-20 20:55:19 +0200 |
commit | 18263698abeb6fc7e4f470c5ac94892af417451e (patch) | |
tree | 20e0920e25fee38db2158a08c396960125bc8961 /libavcodec/utvideoenc.c | |
parent | 67308bd66b7413fb05828976569b5f509846c6c9 (diff) | |
download | ffmpeg-18263698abeb6fc7e4f470c5ac94892af417451e.tar.gz |
utvideoenc: Port to ff_alloc_packet2
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utvideoenc.c')
-rw-r--r-- | libavcodec/utvideoenc.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libavcodec/utvideoenc.c b/libavcodec/utvideoenc.c index 1e7c12b768..f3ba7399cd 100644 --- a/libavcodec/utvideoenc.c +++ b/libavcodec/utvideoenc.c @@ -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; |