mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
ffv1enc: Check context_model
Fixes crash Found-by: durandal_1707 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
479fb7b8af
commit
e01f478dd2
@ -936,6 +936,10 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
||||
if (s->transparency) {
|
||||
av_log(avctx, AV_LOG_WARNING, "Storing alpha plane, this will require a recent FFV1 decoder to playback!\n");
|
||||
}
|
||||
if (avctx->context_model > 1U) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Invalid context model %d, valid values are 0 and 1\n", avctx->context_model);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
for(i=0; i<256; i++){
|
||||
s->quant_table_count=2;
|
||||
|
Loading…
Reference in New Issue
Block a user