diff --git a/libavformat/iff.c b/libavformat/iff.c index 7142a06e98..9402be48c9 100644 --- a/libavformat/iff.c +++ b/libavformat/iff.c @@ -510,6 +510,8 @@ static int iff_read_header(AVFormatContext *s) sta->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO; else if (sta->codecpar->ch_layout.nb_channels == 2) sta->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO; + else if (sta->codecpar->ch_layout.nb_channels == 0) + return AVERROR_INVALIDDATA; break; case ID_ABIT: