forked from FFmpeg/FFmpeg
avfilter/af_surround: fix possible out of array access
This commit is contained in:
parent
7f3e38bda8
commit
34eeb466fb
1 changed files with 2 additions and 3 deletions
|
@ -388,13 +388,12 @@ static inline void get_lfe(int output_lfe, int n, float lowcut, float highcut,
|
|||
dst[2 * n ] = mag * cosf(ph); \
|
||||
dst[2 * n + 1] = mag * sinf(ph);
|
||||
|
||||
|
||||
static void calculate_factors(AVFilterContext *ctx, int ch, int chan)
|
||||
{
|
||||
AudioSurroundContext *s = ctx->priv;
|
||||
float *factor = (float *)s->factors->extended_data[ch];
|
||||
const float f_x = s->f_x[sc_map[chan]];
|
||||
const float f_y = s->f_y[sc_map[chan]];
|
||||
const float f_x = s->f_x[sc_map[chan >= 0 ? chan : 0]];
|
||||
const float f_y = s->f_y[sc_map[chan >= 0 ? chan : 0]];
|
||||
const int rdft_size = s->rdft_size;
|
||||
const float *x = s->x_pos;
|
||||
const float *y = s->y_pos;
|
||||
|
|
Loading…
Add table
Reference in a new issue