From patchwork Tue Jul 27 17:55:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul B Mahol X-Patchwork-Id: 29075 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a5d:965a:0:0:0:0:0 with SMTP id d26csp4837864ios; Tue, 27 Jul 2021 10:56:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzI4AZrvChkt4EZfSzyGihjvHhY1gEc7OUFfQYHIJ9tKAywpzZgmLzfYYTg+OMV2oiL1Dk1 X-Received: by 2002:a17:906:2bc6:: with SMTP id n6mr23236067ejg.256.1627408568748; Tue, 27 Jul 2021 10:56:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627408568; cv=none; d=google.com; s=arc-20160816; b=B7HC0CcbCMEutrPPqOBhPZY1Pm+bJUEKYzFU8WVXABgT1BbQQ3laXhc8QC+QhMfPSE pjf6lHn7BOhqEtEbKG6RPU2cxVAkOijukqFeo0Ojw7ul/+n8uy8ljXibBfs7oA3T6Ia2 LqvPbpJUP4lmymrftOLzJTFyKpkN/OoI793huAlnoZkUww6xO5DR8AXP9A5hMoTBCXc4 QolE09a9JX0SND7GfURE0c+cNlwCDwAhKjz0AHelgDR6M4cwp13hVM2vHxX0x2asXE94 eGrFBxEohsoguTET3wiFB4xcx9GcRFNNlnVV+vFhddPfCWjrpy8z9aFgtiVdgwv5vP6V ewfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to; bh=104D7zCrZoLU+txFWGDaErYJHdBYI4ONlEAS97+WIOw=; b=Xuj8KBgjKcoorXUaHJcSb2zoVJXxtXlhAttgqzqVW+SN3BtLhWBCHlcQN9gwizv+TE Ctv+Lkq+So7wkF175d6dsm+KgtCWYrVs3wkVwDcYfFqsxg1nR0K+LnpxhEe3ORslOBOj fUZy0ZcJgCQp16KiibFHc+wDcV1duOTEoBiKGX7JdKjE1BRUIs3QHJlZopHSIMPNQ9Td AeNuvNuFEdd1JUnk5GOnWFxIxgnyUoJWwQI9LnKsR60/WIIq01HOhR6jUseEnnu235ZG X5HKhqb++Ihgd30ompkZ90B9bewKCqNbd/opFBHWPZQY/mdNQD4UAXDnf/wZYklvR/6r v7FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=AGDmn3d2; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id y17si3922808edc.137.2021.07.27.10.56.07; Tue, 27 Jul 2021 10:56:08 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=AGDmn3d2; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 241BC6899BB; Tue, 27 Jul 2021 20:56:04 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A8DDD680BAD for ; Tue, 27 Jul 2021 20:55:57 +0300 (EEST) Received: by mail-ej1-f46.google.com with SMTP id hp25so71437ejc.11 for ; Tue, 27 Jul 2021 10:55:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=QqiTLxgFbf6NWXGqAmr/e9cxYb/3jvUD1Th/oAyPYSE=; b=AGDmn3d2VW8gNZW9dbF8tTqZygygYKvT8zPCzweDHUTccww46REjxfpLFpJh6kP8O6 H/J3hvzPXE8rNjatmQDJQv+qhozuk5Bpnmw9Xgsp3jFCcXNrKHmGPItA54CtMzCM736v rP+hizKZOtst6+eQEsm2e2pcvbdmPLm+g9ufIoCAnX1+GTDc5pm8yTCeB33GxexAvfhG 8U0nRBjhmtCT0uXmoSgo8xyv364IqWWouA1AHWugYTbgW4cadN9b4HLNjI2wswj5852n kjBo1tuaUFKvYFbD7LBQCiFMM3NrSyRkxkJ+Gt7rtAG+k0Xn3X1ujovgBStdre8agyP9 wwnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=QqiTLxgFbf6NWXGqAmr/e9cxYb/3jvUD1Th/oAyPYSE=; b=AT1fWH/6oHD5H7X6woT78j+RS/jvoiRMBTPiCoCgpVEVWg5wFOKFuzBk3rb6Pnbow9 SIzQjq4+eCHa+syEPzpo5Ga9VFpUDujMaPbvqEJDQm6WKzaxR8UC2pxyYMOi1WwKXYns rS9W/ookZoG+rmBFLluEARmgk4nqyqm/HGYoY84NFE5LnZDWBFgc4MII+Q0SL3hSBTu5 vEeJluPbLUQ45O992YVu95YABTzOnwzQ5TXMrE0OELEgrOOO5Njz0u6636emEoRFOofI JLjXJ8gVcl5J1i3ml8TjiH6ylueBU1SWF1K33s/GSORvDf10QFq5FBhb/5Sy2wl4gpKp y2Wg== X-Gm-Message-State: AOAM531BtNvvsGEqD6ZMoPLE5ModDKECG7/LfFyhYkmTZWh5k0RP0D+r J1a3IwUAauKCLbLeVfc9c1zxCoa2Vkk= X-Received: by 2002:a17:906:3555:: with SMTP id s21mr22423796eja.394.1627408556802; Tue, 27 Jul 2021 10:55:56 -0700 (PDT) Received: from localhost.localdomain ([95.168.118.78]) by smtp.gmail.com with ESMTPSA id jj19sm924352ejc.85.2021.07.27.10.55.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jul 2021 10:55:55 -0700 (PDT) From: Paul B Mahol To: ffmpeg-devel@ffmpeg.org Date: Tue, 27 Jul 2021 19:55:44 +0200 Message-Id: <20210727175544.18227-1-onemda@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH] avfilter/avf_concat: fix EOF timestamp X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: CAUYVZ9zuWfG Signed-off-by: Paul B Mahol --- libavfilter/avf_concat.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libavfilter/avf_concat.c b/libavfilter/avf_concat.c index cb46f52a04..9bbe896444 100644 --- a/libavfilter/avf_concat.c +++ b/libavfilter/avf_concat.c @@ -397,12 +397,18 @@ 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; + + 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);