[FFmpeg-cvslog] avformat/boadec: fix check for invalid channel count

James Almer git at videolan.org
Thu Mar 17 21:53:42 EET 2022


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Mar 17 16:51:57 2022 -0300| [0af06344cd35eb97d6c1e01470c5307530f3cdbe] | committer: James Almer

avformat/boadec: fix check for invalid channel count

Regression since 8269fbcb7ab3b1df3c186126d7f67be7cb7c8f39.

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0af06344cd35eb97d6c1e01470c5307530f3cdbe
---

 libavformat/boadec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/boadec.c b/libavformat/boadec.c
index 8e40b226d0..02763142fb 100644
--- a/libavformat/boadec.c
+++ b/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);



More information about the ffmpeg-cvslog mailing list