Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f9b8387069e_5377_flv_with_pcm_s16be_audio_track.flv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 396ddcf22d55fa7e735d69eed22a4a4b1649b73c)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -916,7 +916,7 @@ retry_duration: |
916 | 916 |
flv->last_channels = |
917 | 917 |
channels = st->codec->channels; |
918 | 918 |
} else { |
919 |
- AVCodecContext ctx; |
|
919 |
+ AVCodecContext ctx = {0}; |
|
920 | 920 |
ctx.sample_rate = sample_rate; |
921 | 921 |
flv_set_audio_codec(s, st, &ctx, flags & FLV_AUDIO_CODECID_MASK); |
922 | 922 |
sample_rate = ctx.sample_rate; |