aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/af_agate.c
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2017-08-31 16:53:35 +0200
committerNicolas George <george@nsup.org>2017-09-12 11:03:50 +0200
commit567d318b1cc11c7733dfe2f43a4bfe16c001865c (patch)
treeb2ffffa786617675f743647398f6e0fccac05711 /libavfilter/af_agate.c
parent76613618d978f9dbee0f391a85a732f77fac75cd (diff)
downloadffmpeg-567d318b1cc11c7733dfe2f43a4bfe16c001865c.tar.gz
lavfi/af_agate: use helper macros.
Diffstat (limited to 'libavfilter/af_agate.c')
-rw-r--r--libavfilter/af_agate.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/libavfilter/af_agate.c b/libavfilter/af_agate.c
index f4fcabef93..20905ccb19 100644
--- a/libavfilter/af_agate.c
+++ b/libavfilter/af_agate.c
@@ -270,10 +270,10 @@ static int activate(AVFilterContext *ctx)
{
AudioGateContext *s = ctx->priv;
AVFrame *out = NULL, *in[2] = { NULL };
- int ret, i, status, nb_samples;
+ int ret, i, nb_samples;
double *dst;
- int64_t pts;
+ FF_FILTER_FORWARD_STATUS_BACK_ALL(ctx->outputs[0], ctx);
if ((ret = ff_inlink_consume_frame(ctx->inputs[0], &in[0])) > 0) {
av_audio_fifo_write(s->fifo[0], (void **)in[0]->extended_data,
in[0]->nb_samples);
@@ -321,13 +321,9 @@ static int activate(AVFilterContext *ctx)
if (ret < 0)
return ret;
}
- if (ff_inlink_acknowledge_status(ctx->inputs[0], &status, &pts)) {
- ff_outlink_set_status(ctx->outputs[0], status, pts);
- return 0;
- } else if (ff_inlink_acknowledge_status(ctx->inputs[1], &status, &pts)) {
- ff_outlink_set_status(ctx->outputs[0], status, pts);
- return 0;
- } else {
+ FF_FILTER_FORWARD_STATUS(ctx->inputs[0], ctx->outputs[0]);
+ FF_FILTER_FORWARD_STATUS(ctx->inputs[1], ctx->outputs[0]);
+ /* TODO reindent */
if (ff_outlink_frame_wanted(ctx->outputs[0])) {
if (!av_audio_fifo_size(s->fifo[0]))
ff_inlink_request_frame(ctx->inputs[0]);
@@ -335,7 +331,6 @@ static int activate(AVFilterContext *ctx)
ff_inlink_request_frame(ctx->inputs[1]);
}
return 0;
- }
}
static int scquery_formats(AVFilterContext *ctx)