Message ID | 20210805111717.1474-2-onemda@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,1/3] avfilter/avfilter: add sample_count_in and sample_count_out | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
Paul B Mahol (12021-08-05): > Signed-off-by: Paul B Mahol <onemda@gmail.com> > --- > libavfilter/avfilter.c | 2 ++ > 1 file changed, 2 insertions(+) > > 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) LGTM if you squash 1 and 2 together.
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)
Signed-off-by: Paul B Mahol <onemda@gmail.com> --- libavfilter/avfilter.c | 2 ++ 1 file changed, 2 insertions(+)