diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-09-30 23:42:50 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-10-01 19:22:35 +0200 |
commit | 417b163c00555ccda201a963e797bfa663a26ff5 (patch) | |
tree | abfcce0f1b32a557ee46a1860ad281ec60a5b655 | |
parent | 25d605d0808b54ec3a78fbf2fedd240e69c34d7c (diff) | |
download | ffmpeg-417b163c00555ccda201a963e797bfa663a26ff5.tar.gz |
avcodec/ffv1enc: 2Pass mode is not possible with golomb coding
"Fixes" Ticket7063
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/ffv1enc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index a6f405289e..3222496dac 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -528,6 +528,11 @@ static av_cold int encode_init(AVCodecContext *avctx) avctx->slices > 1) s->version = FFMAX(s->version, 2); + if ((avctx->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2)) && s->ac == AC_GOLOMB_RICE) { + av_log(avctx, AV_LOG_ERROR, "2 Pass mode is not possible with golomb coding\n"); + return AVERROR(EINVAL); + } + // Unspecified level & slices, we choose version 1.2+ to ensure multithreaded decodability if (avctx->slices == 0 && avctx->level < 0 && avctx->width * avctx->height > 720*576) s->version = FFMAX(s->version, 2); |