[FFmpeg-cvslog] avfilter/af_dynaudnorm: make better check for available samples
Paul B Mahol
git at videolan.org
Thu Mar 11 00:53:05 EET 2021
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Mar 10 23:48:44 2021 +0100| [3e3c408e3fc9ba3ad861e1d3aea22f9e8c1a3894] | committer: Paul B Mahol
avfilter/af_dynaudnorm: make better check for available samples
Also report more correct EOF timestamp.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3e3c408e3fc9ba3ad861e1d3aea22f9e8c1a3894
---
libavfilter/af_dynaudnorm.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavfilter/af_dynaudnorm.c b/libavfilter/af_dynaudnorm.c
index 365453d60d..81fa62b69d 100644
--- a/libavfilter/af_dynaudnorm.c
+++ b/libavfilter/af_dynaudnorm.c
@@ -719,6 +719,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
cqueue_dequeue(s->is_enabled, &is_enabled);
amplify_frame(s, out, is_enabled > 0.);
+ s->pts = out->pts + out->nb_samples;
ret = ff_filter_frame(outlink, out);
}
@@ -769,7 +770,7 @@ static int flush(AVFilterLink *outlink)
} else if (s->queue.available) {
AVFrame *out = ff_bufqueue_get(&s->queue);
- s->pts = out->pts;
+ s->pts = out->pts + out->nb_samples;
ret = ff_filter_frame(outlink, out);
}
@@ -797,7 +798,7 @@ static int activate(AVFilterContext *ctx)
return ret;
}
- if (ff_inlink_queued_samples(inlink) >= s->frame_len) {
+ if (ff_inlink_check_available_samples(inlink, s->frame_len) > 0) {
ff_filter_set_ready(ctx, 10);
return 0;
}
More information about the ffmpeg-cvslog
mailing list