[FFmpeg-cvslog] avfilter/avf_showspectrum: avoid overwritting text

Paul B Mahol git at videolan.org
Sun Jun 3 13:45:20 EEST 2018


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Jun  3 12:26:43 2018 +0200| [9add1786ad4c9549e133ba7a79c22d9c4b19acf3] | committer: Paul B Mahol

avfilter/avf_showspectrum: avoid overwritting text

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9add1786ad4c9549e133ba7a79c22d9c4b19acf3
---

 libavfilter/avf_showspectrum.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
index c86cb739f7..bf9f3c5b91 100644
--- a/libavfilter/avf_showspectrum.c
+++ b/libavfilter/avf_showspectrum.c
@@ -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;
 



More information about the ffmpeg-cvslog mailing list