Skip to content

Commit dcf6142

Browse files
committed
avcodec/ffv1enc: add space for the remap table to max_size
Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <[email protected]>
1 parent a90ff81 commit dcf6142

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libavcodec/ffv1enc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,6 +1249,8 @@ size_t ff_ffv1_encode_buffer_size(AVCodecContext *avctx)
12491249
maxsize += f->slice_count * 800; //for slice header
12501250
if (f->version > 3) {
12511251
maxsize *= f->bits_per_raw_sample + 1;
1252+
if (f->flt) //remap table
1253+
maxsize += f->slice_count * 70000 * (1 + 2*f->chroma_planes + f->transparency);
12521254
} else {
12531255
maxsize += f->slice_count * 2 * (avctx->width + avctx->height); //for bug with slices that code some pixels more than once
12541256
maxsize *= 8*(2*f->bits_per_raw_sample + 5);

0 commit comments

Comments
 (0)