avfilter/avf_showspectrum: avoid overwritting text
authorPaul B Mahol <onemda@gmail.com>
Sun, 3 Jun 2018 10:26:43 +0000 (12:26 +0200)
committerPaul B Mahol <onemda@gmail.com>
Sun, 3 Jun 2018 10:26:43 +0000 (12:26 +0200)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavfilter/avf_showspectrum.c

index c86cb73..bf9f3c5 100644 (file)
@@ -1190,7 +1190,7 @@ static int showspectrumpic_request_frame(AVFilterLink *outlink)
                     for (x = 0; x < w; x+=80) {
                         dst[x] = 200;
                     }
-                    for (x = 0; x < w; x += 80) {
+                    for (x = 0; x < w - 79; x += 80) {
                         float hertz = x * (inlink->sample_rate / 2) / (float)(1 << (int)ceil(log2(w)));
                         char *units;