mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2025-02-21 21:01:43 +00:00
avcodec/utils: report insane channel count errors
More than 64 is not *that* insane, so let's report the error at least. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
85bfcc46d1
commit
5982078e8d
@ -674,6 +674,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
|
||||
av_freep(&avctx->subtitle_header);
|
||||
|
||||
if (avctx->channels > FF_SANE_NB_CHANNELS) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Too many channels: %d\n", avctx->channels);
|
||||
ret = AVERROR(EINVAL);
|
||||
goto free_and_end;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user