diff options
author | Paul B Mahol <onemda@gmail.com> | 2021-07-25 20:09:44 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2021-07-27 20:19:52 +0200 |
commit | 51c22f6621e57f2836048ec1779e2fe195786a9a (patch) | |
tree | 15c81acbfad81de04b081a4bb8118a848c6dc763 /libavfilter | |
parent | f2feb31b78be9f862867d567f12758b635b32b74 (diff) | |
download | ffmpeg-51c22f6621e57f2836048ec1779e2fe195786a9a.tar.gz |
avfilter/avf_concat: fix EOF timestamp
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/avf_concat.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libavfilter/avf_concat.c b/libavfilter/avf_concat.c index cb46f52a04..333a0b090c 100644 --- a/libavfilter/avf_concat.c +++ b/libavfilter/avf_concat.c @@ -397,12 +397,17 @@ static int activate(AVFilterContext *ctx) /* Forward status change */ if (cat->cur_idx < ctx->nb_inputs) { for (i = 0; i < ctx->nb_outputs; i++) { - ret = ff_inlink_acknowledge_status(ctx->inputs[cat->cur_idx + i], &status, &pts); + AVFilterLink *inlink = ctx->inputs[cat->cur_idx + i]; + + ret = ff_inlink_acknowledge_status(inlink, &status, &pts); /* TODO use pts */ if (ret > 0) { close_input(ctx, cat->cur_idx + i); if (cat->cur_idx + ctx->nb_outputs >= ctx->nb_inputs) { - ff_outlink_set_status(ctx->outputs[i], status, pts); + int64_t eof_pts = cat->delta_ts; + + eof_pts += av_rescale_q(pts, inlink->time_base, ctx->outputs[i]->time_base); + ff_outlink_set_status(ctx->outputs[i], status, eof_pts); } if (!cat->nb_in_active) { ret = flush_segment(ctx); |