1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00

avfilter/showvolume : calculate fade only if fade < 1.

This commit is contained in:
Martin Vignali 2018-03-30 21:15:56 +02:00 committed by Paul B Mahol
parent 34304677c0
commit 25b22666a3

View File

@ -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++) {