[FFmpeg-devel] [PATCH] avfilter/avf_concat: fix EOF timestamp
Nicolas George
george at nsup.org
Sun Jul 25 21:45:56 EEST 2021
Paul B Mahol (12021-07-25):
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
> libavfilter/avf_concat.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/libavfilter/avf_concat.c b/libavfilter/avf_concat.c
> index cb46f52a04..8bb5a5d618 100644
> --- a/libavfilter/avf_concat.c
> +++ b/libavfilter/avf_concat.c
> @@ -402,7 +402,10 @@ static int activate(AVFilterContext *ctx)
> 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);
> + ff_outlink_set_status(ctx->outputs[i], status,
> + cat->delta_ts + av_rescale_q(pts,
> + ctx->inputs[cat->cur_idx + i]->time_base,
> + ctx->outputs[i]->time_base));
It looks valid, good catch, but ugly. Please add a local variable for
ctx->inputs[cat->cur_idx + i], which is now used twice, and re-affect pts
in the line before rather than inlining the computation.
> }
> if (!cat->nb_in_active) {
> ret = flush_segment(ctx);
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210725/26dd7b84/attachment.sig>
More information about the ffmpeg-devel
mailing list