This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch release/7.1
in repository ffmpeg.

commit 1d228c913f1f274a1720fcbfd7ba1183d85e89be
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Fri Jun 5 03:24:43 2026 +0200
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Thu Jun 18 20:31:03 2026 +0200

    avcodec/misc4: Check nb channels
    
    Found-by: Forgejo Fairy
    Signed-off-by: Michael Niedermayer <[email protected]>
    (cherry picked from commit 7b717fe50d8d7160c579eebf0b668b5d5d7e118f)
    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 d1a1e56205..d3bc78dc06 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]

Reply via email to