ffmpeg | branch: master | Michael Niedermayer <mich...@niedermayer.cc> | Mon 
Feb  5 02:22:10 2024 +0100| [66f60a2355417d731b5dfd0e6048a154ba1eb088] | 
committer: Michael Niedermayer

avcodec/ac3enc_template: add fbw_channels assert

fbw_channels must be > 0 as teh code is only run if cpl_enabled is set and that 
requires mode >= AC3_CHMODE_STEREO

CID 718138 Uninitialized scalar variable
        assumes this assert to be false

Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

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

 libavcodec/ac3enc_template.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/ac3enc_template.c b/libavcodec/ac3enc_template.c
index ce9ef58a33..34d07cc9e5 100644
--- a/libavcodec/ac3enc_template.c
+++ b/libavcodec/ac3enc_template.c
@@ -223,6 +223,8 @@ static void apply_channel_coupling(AC3EncodeContext *s)
         }
     }
 
+    av_assert1(s->fbw_channels > 0);
+
     /* calculate final coupling coordinates, taking into account reusing of
        coordinates in successive blocks */
     for (bnd = 0; bnd < s->num_cpl_bands; bnd++) {

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to