You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02: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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user