Commit 29255712 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/mpegvideo_enc: Fix possibly exploitable security issue with -bf

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 9f32048d
......@@ -319,6 +319,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
if (avctx->max_b_frames > MAX_B_FRAMES) {
av_log(avctx, AV_LOG_ERROR, "Too many B-frames requested, maximum "
"is %d.\n", MAX_B_FRAMES);
avctx->max_b_frames = MAX_B_FRAMES;
}
s->max_b_frames = avctx->max_b_frames;
s->codec_id = avctx->codec->id;
......
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