avcodec/opus/enc_psy: init intensity_stereo for silent frames

Silent frames return early from ff_opus_psy_celt_frame_init before
intensity_stereo is set, but postencode_update reads it into
avg_is_band, causing a use-of-uninitialized-value. Set it to end_band
like the non-silent path does.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
This commit is contained in:
Kacper Michajłow 2026-05-31 04:01:14 +02:00
parent f71c30ef9e
commit bb6de744cc
No known key found for this signature in database
GPG key ID: 6580132338ABD4E2

View file

@ -312,6 +312,7 @@ void ff_opus_psy_celt_frame_init(OpusPsyContext *s, CeltFrame *f, int index)
f->silence = silence;
if (f->silence) {
f->framebits = 0; /* Otherwise the silence flag eats up 16(!) bits */
f->intensity_stereo = f->end_band; /* Read by postencode_update for avg_is_band */
return;
}