summaryrefslogtreecommitdiff
path: root/libavcodec/ffv1enc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-10-25 01:15:56 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-10-25 02:51:34 +0200
commitc1173437fc3e4ef36a0f19211a9cd4e5c95ccb6c (patch)
tree7693ff7e684d01d21b052f6935cb17174376a05e /libavcodec/ffv1enc.c
parentba53d3ae8bfbd9a66b6f18569c1c4c4d0cc03d7a (diff)
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 <jerome@mediaarea.net> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/ffv1enc.c')
-rw-r--r--libavcodec/ffv1enc.c1
1 files changed, 1 insertions, 0 deletions
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;