diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-09 17:36:01 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-09 20:19:08 +0200 |
commit | 904a2864bdafe19d18db95ca54dfb36d72957a16 (patch) | |
tree | 8553f2d0df810aa2b3efda1baab3fafa6e4a7fdd | |
parent | 9a0e20817aeedbd11fb019e35bae00c2a12cc3e3 (diff) | |
download | ffmpeg-904a2864bdafe19d18db95ca54dfb36d72957a16.tar.gz |
avcodec/ffv1enc: fix size used for ff_alloc_packet2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/ffv1enc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index 6baa7e97bf..7c1b30a147 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -1015,9 +1015,10 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, uint8_t keystate = 128; uint8_t *buf_p; int i, ret; + int64_t maxsize = FF_MIN_BUFFER_SIZE + + avctx->width*avctx->height*35LL*4; - if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width*avctx->height*((8*2+1+1)*4)/8 - + FF_MIN_BUFFER_SIZE)) < 0) + if ((ret = ff_alloc_packet2(avctx, pkt, maxsize)) < 0) return ret; ff_init_range_encoder(c, pkt->data, pkt->size); |