diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-22 04:24:41 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-22 19:03:19 +0100 |
commit | e180079c1f48cb5342677f33a7547562f34bc206 (patch) | |
tree | e49dde83b1ead5e3c16b36847de86ed8a2b8445e /libavcodec | |
parent | 5dadfaa9f5c099cd95a1cdb82ffc4d4f19dd7769 (diff) | |
download | ffmpeg-e180079c1f48cb5342677f33a7547562f34bc206.tar.gz |
huffyuvenc: switch to ff_alloc_packet2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/huffyuv.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c index afc395a906..7082ed8276 100644 --- a/libavcodec/huffyuv.c +++ b/libavcodec/huffyuv.c @@ -29,6 +29,7 @@ */ #include "avcodec.h" +#include "internal.h" #include "get_bits.h" #include "put_bits.h" #include "dsputil.h" @@ -1278,9 +1279,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, AVFrame * const p= &s->picture; int i, j, size = 0, ret; - if (!pkt->data && - (ret = av_new_packet(pkt, width * height * 3 * 4 + FF_MIN_BUFFER_SIZE)) < 0) { - av_log(avctx, AV_LOG_ERROR, "Error allocating output packet.\n"); + if ((ret = ff_alloc_packet2(avctx, pkt, width * height * 3 * 4 + FF_MIN_BUFFER_SIZE)) < 0) { return ret; } |