Browse Source

avcodec/ffv1enc: fix size used for ff_alloc_packet2()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.1
Michael Niedermayer 12 years ago
parent
commit
904a2864bd
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      libavcodec/ffv1enc.c

+ 3
- 2
libavcodec/ffv1enc.c View File

@@ -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);


Loading…
Cancel
Save