1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Michael Niedermayer 2024-02-05 02:22:10 +01:00
parent 98ae1ad7cf
commit 66f60a2355
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -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 /* calculate final coupling coordinates, taking into account reusing of
coordinates in successive blocks */ coordinates in successive blocks */
for (bnd = 0; bnd < s->num_cpl_bands; bnd++) { for (bnd = 0; bnd < s->num_cpl_bands; bnd++) {