You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avfilter/vaf_spectrumsynth: don't use uninitialized variable as scale
scale was never initialized. av_tx_init() will use default scale if we
pass NULL.
Fixes: b3117f376d
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
This commit is contained in:
@ -149,7 +149,7 @@ static int config_output(AVFilterLink *outlink)
|
|||||||
int height = ctx->inputs[0]->h;
|
int height = ctx->inputs[0]->h;
|
||||||
AVRational time_base = ctx->inputs[0]->time_base;
|
AVRational time_base = ctx->inputs[0]->time_base;
|
||||||
AVRational frame_rate = inl0->frame_rate;
|
AVRational frame_rate = inl0->frame_rate;
|
||||||
float factor, overlap, scale;
|
float factor, overlap;
|
||||||
int i, ch, ret;
|
int i, ch, ret;
|
||||||
|
|
||||||
outlink->sample_rate = s->sample_rate;
|
outlink->sample_rate = s->sample_rate;
|
||||||
@ -184,7 +184,7 @@ static int config_output(AVFilterLink *outlink)
|
|||||||
s->win_size = s->size * 2;
|
s->win_size = s->size * 2;
|
||||||
s->nb_freq = s->size;
|
s->nb_freq = s->size;
|
||||||
|
|
||||||
ret = av_tx_init(&s->fft, &s->tx_fn, AV_TX_FLOAT_FFT, 1, s->win_size, &scale, 0);
|
ret = av_tx_init(&s->fft, &s->tx_fn, AV_TX_FLOAT_FFT, 1, s->win_size, NULL, 0);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
av_log(ctx, AV_LOG_ERROR, "Unable to create FFT context. "
|
av_log(ctx, AV_LOG_ERROR, "Unable to create FFT context. "
|
||||||
"The window size might be too high.\n");
|
"The window size might be too high.\n");
|
||||||
|
Reference in New Issue
Block a user