summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorMartin Vignali <martin.vignali@gmail.com>2018-03-30 21:15:56 +0200
committerPaul B Mahol <onemda@gmail.com>2018-03-31 09:11:39 +0200
commit25b22666a3c05ae15a5d6cc3b0be5c8b034f00f6 (patch)
tree60f4dff71b1186ffdde2b5c6c0970c4fb0535f66 /libavfilter
parent34304677c05be782964b9fb704b13c01e19c9c80 (diff)
avfilter/showvolume : calculate fade only if fade < 1.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/avf_showvolume.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/avf_showvolume.c b/libavfilter/avf_showvolume.c
index ab1fb619b9..db16733202 100644
--- a/libavfilter/avf_showvolume.c
+++ b/libavfilter/avf_showvolume.c
@@ -273,6 +273,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
}
s->out->pts = insamples->pts;
+ if (s->f < 1.) {
for (j = 0; j < outlink->h; j++) {
uint8_t *dst = s->out->data[0] + j * s->out->linesize[0];
const uint32_t alpha = s->bgopacity * 255;
@@ -284,6 +285,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
dst[k * 4 + 3] = FFMAX(dst[k * 4 + 3] * s->f, alpha);
}
}
+ }
if (s->orientation) { /* vertical */
for (c = 0; c < inlink->channels; c++) {