mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-11 17:55:21 +00:00
avcodec/decode: Check max_samples in get_buffer_internal()
This checks max_samples at the same level as max_pixels Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
68c80dc312
commit
121bf1b3b8
@ -1924,6 +1924,11 @@ static int get_buffer_internal(AVCodecContext *avctx, AVFrame *frame, int flags)
|
||||
av_log(avctx, AV_LOG_ERROR, "pic->data[*]!=NULL in get_buffer_internal\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
} else if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) {
|
||||
if (frame->nb_samples > avctx->max_samples) {
|
||||
av_log(avctx, AV_LOG_ERROR, "samples per frame %d, exceeds max_samples %"PRId64"\n", frame->nb_samples, avctx->max_samples);
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
}
|
||||
ret = ff_decode_frame_props(avctx, frame);
|
||||
if (ret < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user