[FFmpeg-cvslog] avcodec/ffv1enc: Fix storing RGB48 without explicitly set level

Michael Niedermayer git at videolan.org
Tue Oct 25 04:06:18 EEST 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue Oct 25 01:15:56 2016 +0200| [c1173437fc3e4ef36a0f19211a9cd4e5c95ccb6c] | committer: Michael Niedermayer

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 at mediaarea.net>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c1173437fc3e4ef36a0f19211a9cd4e5c95ccb6c
---

 libavcodec/ffv1enc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index dae68ae..68d311d 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;



More information about the ffmpeg-cvslog mailing list