diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-22 15:00:49 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-22 19:03:22 +0100 |
commit | 219d8245a0ff2cad480ba5399b349825f7b2cee2 (patch) | |
tree | 906beeeb93a7bb990c2c2274e200fdda8533dc14 /libavcodec | |
parent | ea8fc91886b39fd10b8e7950f879f515911d54b8 (diff) | |
download | ffmpeg-219d8245a0ff2cad480ba5399b349825f7b2cee2.tar.gz |
tiffenc: switch to ff_alloc_packet2().
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/tiffenc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c index 8cda2b2d36..e206cd3231 100644 --- a/libavcodec/tiffenc.c +++ b/libavcodec/tiffenc.c @@ -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; |