mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/mpegvideo_enc: Fix possibly exploitable security issue with -bf
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
9f32048dd1
commit
2925571278
|
@ -319,6 +319,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
|
||||||
if (avctx->max_b_frames > MAX_B_FRAMES) {
|
if (avctx->max_b_frames > MAX_B_FRAMES) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Too many B-frames requested, maximum "
|
av_log(avctx, AV_LOG_ERROR, "Too many B-frames requested, maximum "
|
||||||
"is %d.\n", MAX_B_FRAMES);
|
"is %d.\n", MAX_B_FRAMES);
|
||||||
|
avctx->max_b_frames = MAX_B_FRAMES;
|
||||||
}
|
}
|
||||||
s->max_b_frames = avctx->max_b_frames;
|
s->max_b_frames = avctx->max_b_frames;
|
||||||
s->codec_id = avctx->codec->id;
|
s->codec_id = avctx->codec->id;
|
||||||
|
|
Loading…
Reference in New Issue