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