Commit 1ccc2157 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/libxvid: Partially check plugins array size with assert

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 412df0a5
......@@ -641,6 +641,8 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx) {
xvid_enc_create.bquant_ratio = 100 * avctx->b_quant_factor;
if( avctx->max_b_frames > 0 && !x->quicktime_format ) xvid_enc_create.global |= XVID_GLOBAL_PACKED;
av_assert0(xvid_enc_create.num_plugins + (!!x->ssim) + (!!x->variance_aq) + (!!x->lumi_aq) <= FF_ARRAY_ELEMS(plugins));
/* Create encoder context */
xerr = xvid_encore(NULL, XVID_ENC_CREATE, &xvid_enc_create, NULL);
if( xerr ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment