diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c index 0113683ee2..fb8f7185ad 100644 --- a/libavformat/electronicarts.c +++ b/libavformat/electronicarts.c @@ -424,8 +424,9 @@ static int ea_read_header(AVFormatContext *s, } if (ea->audio_codec) { - if (ea->num_channels <= 0) { - av_log(s, AV_LOG_WARNING, "Unsupported number of channels: %d\n", ea->num_channels); + if (ea->num_channels <= 0 || ea->num_channels > 2) { + av_log(s, AV_LOG_WARNING, + "Unsupported number of channels: %d\n", ea->num_channels); ea->audio_codec = 0; return 1; }