Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-06-03 16:22:41 +0300
committerPaul B Mahol <onemda@gmail.com>2021-08-05 16:42:48 +0300
commitc317862c883bdec40292f709add3ba30f606c6a3 (patch)
treee34d70bf2a04a420326a0944d85aa9a88aab9616 /libavfilter/avfilter.c
parent82123e133db6d556f3366a1cbb4f0439d70539d4 (diff)
avfilter/avfilter: add sample_count_in and sample_count_out
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r--libavfilter/avfilter.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 24de8ebee3..e0847c724b 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -1013,6 +1013,7 @@ int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
link->frame_blocked_in = link->frame_wanted_out = 0;
link->frame_count_in++;
+ link->sample_count_in += frame->nb_samples;
filter_unblock(link->dst);
ret = ff_framequeue_add(&link->fifo, frame);
if (ret < 0) {
@@ -1372,6 +1373,7 @@ static void consume_update(AVFilterLink *link, const AVFrame *frame)
ff_inlink_process_commands(link, frame);
link->dst->is_disabled = !ff_inlink_evaluate_timeline_at_frame(link, frame);
link->frame_count_out++;
+ link->sample_count_out += frame->nb_samples;
}
int ff_inlink_consume_frame(AVFilterLink *link, AVFrame **rframe)