Unified · Split
| @@ -388,13 +388,12 @@ static inline void get_lfe(int output_lfe, int n, float lowcut, float highcut, · 387 unmodified lines | ||
| 388 | 388 | dst[2 * n ] = mag * cosf(ph); \ |
| 389 | 389 | dst[2 * n + 1] = mag * sinf(ph); |
| 390 | 390 | |
| 391 | − | |
| 392 | 391 | static void calculate_factors(AVFilterContext *ctx, int ch, int chan) |
| 393 | 392 | { |
| 394 | 393 | AudioSurroundContext *s = ctx->priv; |
| 395 | 394 | float *factor = (float *)s->factors->extended_data[ch]; |
| 396 | − const float f_x = s->f_x[sc_map[chan]]; | |
| 397 | − const float f_y = s->f_y[sc_map[chan]]; | |
| 395 | + const float f_x = s->f_x[sc_map[chan >= 0 ? chan : 0]]; | |
| 396 | + const float f_y = s->f_y[sc_map[chan >= 0 ? chan : 0]]; | |
| 398 | 397 | const int rdft_size = s->rdft_size; |
| 399 | 398 | const float *x = s->x_pos; |
| 400 | 399 | const float *y = s->y_pos; |