mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-09 09:32:43 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user