1
0
Fork 0

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
1 changed files with 2 additions and 0 deletions

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
coordinates in successive blocks */
for (bnd = 0; bnd < s->num_cpl_bands; bnd++) {