diff --git a/libavfilter/avf_showcqt.c b/libavfilter/avf_showcqt.c
index c630ffd0af71cd697341dda787d1c98b5f4d9aed..d6e2928d7dd34503b4febeeb0a473c6075b691af 100644
--- a/libavfilter/avf_showcqt.c
+++ b/libavfilter/avf_showcqt.c
@@ -993,7 +993,7 @@ static int plot_cqt(AVFilterContext *ctx)
 {
     AVFilterLink *outlink = ctx->outputs[0];
     ShowCQTContext *s = ctx->priv;
-    int ret;
+    int ret = 0;
 
     memcpy(s->fft_result, s->fft_data, s->fft_len * sizeof(*s->fft_data));
     av_fft_permute(s->fft_ctx, s->fft_result);