Unified · Split
| @@ -1013,6 +1013,7 @@ int ff_filter_frame(AVFilterLink *link, AVFrame *frame) · 1012 unmodified lines | |||
| 1013 | 1013 | ||
| 1014 | link->frame_blocked_in = link->frame_wanted_out = 0; | 1014 | link->frame_blocked_in = link->frame_wanted_out = 0; |
| 1015 | link->frame_count_in++; | 1015 | link->frame_count_in++; |
| 1016 | link->sample_count_in += frame->nb_samples; | ||
| 1016 | filter_unblock(link->dst); | 1017 | filter_unblock(link->dst); |
| 1017 | ret = ff_framequeue_add(&link->fifo, frame); | 1018 | ret = ff_framequeue_add(&link->fifo, frame); |
| 1018 | if (ret < 0) { | 1019 | if (ret < 0) { |
| @@ -1372,6 +1373,7 @@ static void consume_update(AVFilterLink *link, const AVFrame *frame) · 353 unmodified lines | |||
| 1372 | ff_inlink_process_commands(link, frame); | 1373 | ff_inlink_process_commands(link, frame); |
| 1373 | link->dst->is_disabled = !ff_inlink_evaluate_timeline_at_frame(link, frame); | 1374 | link->dst->is_disabled = !ff_inlink_evaluate_timeline_at_frame(link, frame); |
| 1374 | link->frame_count_out++; | 1375 | link->frame_count_out++; |
| 1376 | link->sample_count_out += frame->nb_samples; | ||
| 1375 | } | 1377 | } |
| 1376 | 1378 | ||
| 1377 | int ff_inlink_consume_frame(AVFilterLink *link, AVFrame **rframe) | 1379 | int ff_inlink_consume_frame(AVFilterLink *link, AVFrame **rframe) |
| @@ -584,6 +584,11 @@ struct AVFilterLink { · 583 unmodified lines | |||
| 584 | */ | 584 | */ |
| 585 | int64_t frame_count_in, frame_count_out; | 585 | int64_t frame_count_in, frame_count_out; |
| 586 | 586 | ||
| 587 | /** | ||
| 588 | * Number of past samples sent through the link. | ||
| 589 | */ | ||
| 590 | int64_t sample_count_in, sample_count_out; | ||
| 591 | |||
| 587 | /** | 592 | /** |
| 588 | * A pointer to a FFFramePool struct. | 593 | * A pointer to a FFFramePool struct. |
| 589 | */ | 594 | */ |