avcodec/ffv1enc: Ensure that bits per raw sample is valid
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 26 Apr 2015 19:09:17 +0000 (21:09 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 26 Apr 2015 19:09:17 +0000 (21:09 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/ffv1enc.c

index 5b0ade4..805158e 100644 (file)
@@ -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");
     }