aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2023-11-18 23:44:18 +0100
committerPaul B Mahol <onemda@gmail.com>2023-11-18 23:50:39 +0100
commit7c16bf0829802534004326c8e65fb6cdbdb634fa (patch)
tree81f0ea74926eafeb6e5352f0d6f224979cb26f87 /libavfilter
parent3ed2225a9d066ad1e4d83f46c9e721021f367f56 (diff)
downloadffmpeg-7c16bf0829802534004326c8e65fb6cdbdb634fa.tar.gz
avfilter/avf_showvolume: improve step for vertical orientation
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/avf_showvolume.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/avf_showvolume.c b/libavfilter/avf_showvolume.c
index b61f6c1d4f..7ec9daf628 100644
--- a/libavfilter/avf_showvolume.c
+++ b/libavfilter/avf_showvolume.c
@@ -370,13 +370,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
max = av_clipf(max, 0, 1);
max_draw = calc_max_draw(s, outlink, max);
- for (j = max_draw; j < s->w; j++) {
+ for (j = s->w - 1; j >= max_draw; j--) {
uint8_t *dst = s->out->data[0] + j * s->out->linesize[0] + c * (s->b + s->h) * 4;
for (k = 0; k < s->h; k++) {
AV_WN32A(&dst[k * 4], lut[s->w - j - 1]);
- if (j & step)
- j += step;
}
+ if (j & step)
+ j -= step;
}
if (s->draw_persistent_duration > 0.) {