This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 7b717fe50d avcodec/misc4: Check nb channels
7b717fe50d is described below
commit 7b717fe50d8d7160c579eebf0b668b5d5d7e118f
Author: Michael Niedermayer <[email protected]>
AuthorDate: Fri Jun 5 03:24:43 2026 +0200
Commit: michaelni <[email protected]>
CommitDate: Sat Jun 13 15:55:40 2026 +0000
avcodec/misc4: Check nb channels
Found-by: Forgejo Fairy
Signed-off-by: Michael Niedermayer <[email protected]>
---
libavcodec/misc4.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/misc4.c b/libavcodec/misc4.c
index af075882f5..ac87ebd5cb 100644
--- a/libavcodec/misc4.c
+++ b/libavcodec/misc4.c
@@ -60,6 +60,9 @@ static av_cold int misc4_init(AVCodecContext *avctx)
if (avctx->sample_rate <= 0)
return AVERROR_INVALIDDATA;
+ if (avctx->ch_layout.nb_channels != 1 && avctx->ch_layout.nb_channels != 2)
+ return AVERROR_INVALIDDATA;
+
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
switch (avctx->sample_rate) {
case 8000:
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]