diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-09-29 19:11:25 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-29 19:11:25 +0200 |
commit | f049729e613ed3fb0abf767eb14423f545385c6e (patch) | |
tree | c848a201e6073c8a7def9d5d81c86c0f697fb345 /libavcodec | |
parent | 594b1fcb28ec36893e0c269ba10b83f783467160 (diff) | |
download | ffmpeg-f049729e613ed3fb0abf767eb14423f545385c6e.tar.gz |
ffv1enc: fix integer overflow with high resolutions and lots of slices.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/ffv1.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c index 8f89542de7..572bcbb2df 100644 --- a/libavcodec/ffv1.c +++ b/libavcodec/ffv1.c @@ -1313,9 +1313,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, for(i=1; i<f->slice_count; i++){ FFV1Context *fs= f->slice_context[i]; - uint8_t *start = pkt->data + (pkt->size-used_count)*i/f->slice_count; + uint8_t *start = pkt->data + (pkt->size-used_count)*(int64_t)i/f->slice_count; int len = pkt->size/f->slice_count; - ff_init_range_encoder(&fs->c, start, len); } avctx->execute(avctx, encode_slice, &f->slice_context[0], NULL, f->slice_count, sizeof(void*)); |