[FFmpeg-cvslog] avcodec/ffv1enc: Ensure that bits per raw sample is valid

Michael Niedermayer git at videolan.org
Sun Apr 26 21:48:24 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Apr 26 21:09:17 2015 +0200| [81e40c26e176a6bcd91d1bfbf9e1820d89bb493b] | committer: Michael Niedermayer

avcodec/ffv1enc: Ensure that bits per raw sample is valid

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 5b0ade4..805158e 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -793,6 +793,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
         av_log(avctx, AV_LOG_ERROR, "format not supported\n");
         return AVERROR(ENOSYS);
     }
+    av_assert0(s->bits_per_raw_sample >= 8);
+
     if (s->transparency) {
         av_log(avctx, AV_LOG_WARNING, "Storing alpha plane, this will require a recent FFV1 decoder to playback!\n");
     }



More information about the ffmpeg-cvslog mailing list