Unified · Split
| @@ -40,6 +40,7 @@ typedef struct AFFTFiltContext { · 39 unmodified lines | ||
| 40 | 40 | FFTComplex **fft_data; |
| 41 | 41 | FFTComplex **fft_temp; |
| 42 | 42 | int nb_exprs; |
| 43 | + int channels; | |
| 43 | 44 | int window_size; |
| 44 | 45 | AVExpr **real; |
| 45 | 46 | AVExpr **imag; |
| @@ -129,6 +130,7 @@ static int config_input(AVFilterLink *inlink) · 83 unmodified lines | ||
| 129 | 130 | char *args; |
| 130 | 131 | const char *last_expr = "1"; |
| 131 | 132 | |
| 133 | + s->channels = inlink->channels; | |
| 132 | 134 | s->pts = AV_NOPTS_VALUE; |
| 133 | 135 | s->fft_bits = av_log2(s->fft_size); |
| 134 | 136 | s->fft = av_fft_init(s->fft_bits, 0); |
| @@ -435,7 +437,7 @@ static av_cold void uninit(AVFilterContext *ctx) · 300 unmodified lines | ||
| 435 | 437 | av_fft_end(s->fft); |
| 436 | 438 | av_fft_end(s->ifft); |
| 437 | 439 | |
| 438 | − for (i = 0; i < s->nb_exprs; i++) { | |
| 440 | + for (i = 0; i < s->channels; i++) { | |
| 439 | 441 | if (s->fft_data) |
| 440 | 442 | av_freep(&s->fft_data[i]); |
| 441 | 443 | if (s->fft_temp) |