diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
index bbe42ba7c7c4f285130d4719f42008fa90471cff..f5e8561713e983c3cac3c7d12b78197189dd4d95 100644
--- a/libavfilter/avf_showspectrum.c
+++ b/libavfilter/avf_showspectrum.c
@@ -446,7 +446,7 @@ static int config_output(AVFilterLink *outlink)
     outlink->sample_aspect_ratio = (AVRational){1,1};
 
     if (s->legend) {
-        s->start_x = log10(inlink->sample_rate) * 25;
+        s->start_x = (log10(inlink->sample_rate) + 1) * 25;
         s->start_y = 64;
         outlink->w += s->start_x * 2;
         outlink->h += s->start_y * 2;