From c1173437fc3e4ef36a0f19211a9cd4e5c95ccb6c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 25 Oct 2016 01:15:56 +0200 Subject: [PATCH] avcodec/ffv1enc: Fix storing RGB48 without explicitly set level the bps value is only stored with level >= 1, using rgb48 with level 0 requires the user app to keep track of the bps by external means, which does not always happen also we force level >= 1 for other 16bps formats, so this is consistent. Found-by: Jerome Martinez Signed-off-by: Michael Niedermayer --- libavcodec/ffv1enc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index dae68aee63..68d311d1b8 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -629,6 +629,7 @@ FF_ENABLE_DEPRECATION_WARNINGS s->chroma_planes = 1; s->bits_per_raw_sample = 16; s->use32bit = 1; + s->version = FFMAX(s->version, 1); if (avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) { av_log(avctx, AV_LOG_ERROR, "16bit RGB is experimental and under development, only use it for experiments\n"); return AVERROR_INVALIDDATA;