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 | 846 | for (i = 0; i < nb_frames; i++) { |
| 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); | |
| 847 | + for (j = 0; j < coded_channels && !s->midonly; j++) { | |
| 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 | 852 | /* reset the side channel if it is not coded */ |
| 851 | 853 | if (s->midonly && s->frame[1].coded) |