You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/ffv1enc: add space for the remap table to max_size
Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@ -1249,6 +1249,8 @@ size_t ff_ffv1_encode_buffer_size(AVCodecContext *avctx)
|
|||||||
maxsize += f->slice_count * 800; //for slice header
|
maxsize += f->slice_count * 800; //for slice header
|
||||||
if (f->version > 3) {
|
if (f->version > 3) {
|
||||||
maxsize *= f->bits_per_raw_sample + 1;
|
maxsize *= f->bits_per_raw_sample + 1;
|
||||||
|
if (f->flt) //remap table
|
||||||
|
maxsize += f->slice_count * 70000 * (1 + 2*f->chroma_planes + f->transparency);
|
||||||
} else {
|
} else {
|
||||||
maxsize += f->slice_count * 2 * (avctx->width + avctx->height); //for bug with slices that code some pixels more than once
|
maxsize += f->slice_count * 2 * (avctx->width + avctx->height); //for bug with slices that code some pixels more than once
|
||||||
maxsize *= 8*(2*f->bits_per_raw_sample + 5);
|
maxsize *= 8*(2*f->bits_per_raw_sample + 5);
|
||||||
|
Reference in New Issue
Block a user