avfilter/af_stereowiden: add timeline support

pull/310/head
Paul B Mahol 6 years ago
parent 0ee65ea95c
commit 01204c04b0
  1. 10
      libavfilter/af_stereowiden.c

@ -113,8 +113,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
if (s->cur == s->buffer + s->length) if (s->cur == s->buffer + s->length)
s->cur = s->buffer; s->cur = s->buffer;
dst[0] = drymix * left - crossfeed * right - feedback * s->cur[1]; if (ctx->is_disabled) {
dst[1] = drymix * right - crossfeed * left - feedback * s->cur[0]; dst[0] = left;
dst[1] = right;
} else {
dst[0] = drymix * left - crossfeed * right - feedback * s->cur[1];
dst[1] = drymix * right - crossfeed * left - feedback * s->cur[0];
}
s->cur[0] = left; s->cur[0] = left;
s->cur[1] = right; s->cur[1] = right;
@ -159,4 +164,5 @@ AVFilter ff_af_stereowiden = {
.uninit = uninit, .uninit = uninit,
.inputs = inputs, .inputs = inputs,
.outputs = outputs, .outputs = outputs,
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL,
}; };

Loading…
Cancel
Save