提交 19df5dcb 编写于 作者: M Michael Niedermayer

avcodec/dnxhdenc: check that qmax is within the supported range

Signed-off-by: NMichael Niedermayer <michaelni@gmx.at>
上级 f1caaa1c
......@@ -341,6 +341,11 @@ static av_cold int dnxhd_encode_init(AVCodecContext *avctx)
return -1;
}
if (avctx->qmax <= 1) {
av_log(avctx, AV_LOG_ERROR, "qmax must be at least 2\n");
return AVERROR(EINVAL);
}
ctx->thread[0] = ctx;
for (i = 1; i < avctx->thread_count; i++) {
ctx->thread[i] = av_malloc(sizeof(DNXHDEncContext));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册