diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-02-05 02:22:10 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-02-12 00:50:46 +0100 |
commit | 66f60a2355417d731b5dfd0e6048a154ba1eb088 (patch) | |
tree | d27d38ad7aa71a7f6b5d854a3e0fbe061d0ca137 | |
parent | 98ae1ad7cf16bd10a4fa79f676439edc4da7cba6 (diff) | |
download | ffmpeg-66f60a2355417d731b5dfd0e6048a154ba1eb088.tar.gz |
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 <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/ac3enc_template.c | 2 |
1 files changed, 2 insertions, 0 deletions
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++) { |