mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-14 11:30:39 +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:
parent
f71c30ef9e
commit
bb6de744cc
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue