You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avfilter/af_dynaudnorm: make better check for available samples
Also report more correct EOF timestamp.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user