Fixes use-of-uninitialized-value under MSAN.
Unified · Split
| @@ -844,8 +844,10 @@ int ff_silk_decode_superframe(SilkContext *s, OpusRangeCoder *rc, · 843 unmodified lines | |||
| 844 | } | 844 | } |
| 845 | 845 | ||
| 846 | for (i = 0; i < nb_frames; i++) { | 846 | for (i = 0; i < nb_frames; i++) { |
| 847 | for (j = 0; j < coded_channels && !s->midonly; j++) | 847 | for (j = 0; j < coded_channels && !s->midonly; j++) { |
| 848 | silk_decode_frame(s, rc, i, j, coded_channels, active[j][i], active[1][i], 0); | 848 | int active1 = coded_channels > 1 ? active[1][i] : 0; |
| 849 | silk_decode_frame(s, rc, i, j, coded_channels, active[j][i], active1, 0); | ||
| 850 | } | ||
| 849 | 851 | ||
| 850 | /* reset the side channel if it is not coded */ | 852 | /* reset the side channel if it is not coded */ |
| 851 | if (s->midonly && s->frame[1].coded) | 853 | if (s->midonly && s->frame[1].coded) |