avformat/boadec: fix check for invalid channel count

Regression since 8269fbcb7a.

Signed-off-by: James Almer <jamrial@gmail.com>
release/5.1
James Almer 3 years ago
parent 85b7be53e1
commit 0af06344cd
  1. 2
      libavformat/boadec.c

@ -57,7 +57,7 @@ static int read_header(AVFormatContext *s)
st->codecpar->sample_rate = avio_rl32(s->pb);
st->codecpar->ch_layout.nb_channels = avio_rl32(s->pb);
if (st->codecpar->ch_layout.nb_channels > FF_SANE_NB_CHANNELS ||
st->codecpar->ch_layout.order <= 0)
st->codecpar->ch_layout.nb_channels <= 0)
return AVERROR(ENOSYS);
ffformatcontext(s)->data_offset = data_offset = avio_rl32(s->pb);
avio_r8(s->pb);

Loading…
Cancel
Save