Commit 219d8245 authored by Michael Niedermayer's avatar Michael Niedermayer

tiffenc: switch to ff_alloc_packet2().

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent ea8fc918
......@@ -29,6 +29,7 @@
#include "libavutil/opt.h"
#include "avcodec.h"
#include "internal.h"
#if CONFIG_ZLIB
#include <zlib.h>
#endif
......@@ -303,10 +304,8 @@ static int encode_frame(AVCodecContext * avctx, AVPacket *pkt,
strips = (s->height - 1) / s->rps + 1;
if (!pkt->data &&
(ret = av_new_packet(pkt, avctx->width * avctx->height * s->bpp * 2 +
if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width * avctx->height * s->bpp * 2 +
avctx->height * 4 + FF_MIN_BUFFER_SIZE)) < 0) {
av_log(avctx, AV_LOG_ERROR, "Error getting output packet.\n");
return ret;
}
ptr = 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