aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/af_afade.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2019-10-16 00:45:26 +0200
committerPaul B Mahol <onemda@gmail.com>2019-10-16 00:59:30 +0200
commit29dac2927f5fa0b1f5c6b27a3ed32f2968ea9b00 (patch)
treeeb26401547887f3c74f9d292818efe63a8014704 /libavfilter/af_afade.c
parent2558e62713ebc5f3ea22c1a28d8e9cf3249badaf (diff)
downloadffmpeg-29dac2927f5fa0b1f5c6b27a3ed32f2968ea9b00.tar.gz
avfilter/af_afade: make sure that in is available
Diffstat (limited to 'libavfilter/af_afade.c')
-rw-r--r--libavfilter/af_afade.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libavfilter/af_afade.c b/libavfilter/af_afade.c
index 0c43b2233d..10505caf1f 100644
--- a/libavfilter/af_afade.c
+++ b/libavfilter/af_afade.c
@@ -459,16 +459,17 @@ static int activate(AVFilterContext *ctx)
} else if (ff_inlink_acknowledge_status(ctx->inputs[1], &status, &pts)) {
ff_outlink_set_status(ctx->outputs[0], status, pts);
return 0;
- } else {
- if (ff_outlink_frame_wanted(ctx->outputs[0]) && !in) {
+ } else if (!ret) {
+ if (ff_outlink_frame_wanted(ctx->outputs[0])) {
ff_inlink_request_frame(ctx->inputs[1]);
return 0;
}
+ } else {
+ in->pts = s->pts;
+ s->pts += av_rescale_q(in->nb_samples,
+ (AVRational){ 1, outlink->sample_rate }, outlink->time_base);
+ return ff_filter_frame(outlink, in);
}
- in->pts = s->pts;
- s->pts += av_rescale_q(in->nb_samples,
- (AVRational){ 1, outlink->sample_rate }, outlink->time_base);
- return ff_filter_frame(outlink, in);
}
if (ff_inlink_queued_samples(ctx->inputs[0]) > s->nb_samples) {