From patchwork Sun Sep 13 12:06:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul B Mahol X-Patchwork-Id: 22337 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 58E31449A35 for ; Sun, 13 Sep 2020 15:07:07 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2E01368BBF5; Sun, 13 Sep 2020 15:07:07 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ed1-f66.google.com (mail-ed1-f66.google.com [209.85.208.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 154A268B9E1 for ; Sun, 13 Sep 2020 15:07:01 +0300 (EEST) Received: by mail-ed1-f66.google.com with SMTP id q21so14910010edv.1 for ; Sun, 13 Sep 2020 05:07:01 -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=jAIcK+LLQgekrUocygFstzhqGsP5aSEzms1zUDcw04U=; b=m4ycIa/UEkQ9dvO7TLDPEtey+R8lVoBd7OcE6DprRl07NiVGoYT6kveGvwtw16aNbG XVXWlr0v2uPJ8ihBO0WWJS7loysDH/M16UEqGel5rkWuC86gyRgVGffbUWbp5xFO13iI WuDsfiJRJso19i8zDwbENEGOaLuibFi6wjgodSLIx3LhqB96Iyd5bRTTpPyGdM2Y3deY +YTVk0hmFcOWpSr8Ab4u2kexW0NwAESiLalhGlbndMU0EVf05vjdIq3FQ8SJ7mCH6hjZ SgUg9y5ZEi2yv+JtNFloxJqqtgHEWaOLdWWbW8CObviijSB+V6KZXZbgKy8v6vUfGYna h0FA== 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=jAIcK+LLQgekrUocygFstzhqGsP5aSEzms1zUDcw04U=; b=BnstZp8hpFspf0C5zO3bhIsqSnYAO+3rrSiLuF3yvM48ITZM0ehGVcZ49KFtsoSV3K /5haCS3kOiTm7Y1pb5vkhB2uKQgdg/oBB/qhZBc6mgBxmsWdnOX2FShp0X1iBtkLy/gQ W+oCiX2F4oL9Gh+V7lKrCmZAiXpwCPRAj49YCfQBzTzendGOLxFkGL3X1CkeQwyyvLhx w1kYSiulVb2i3quzgC6e6J5mKchmCwDVW9HQrRRYX/E12q6hEXC5DR5TQRv3IAu/nygg c68Me4n2dNQSeV4KfZYBlj5mvZpJB0Z8KIZ05CBLILASYuRE1iD985JT14xv7Ho5D/5z S1vg== X-Gm-Message-State: AOAM532tujNFFsEi0IsfJla1sgcjW9jMsk3OKXJSxOlVyALSODxdDXC7 9JC2BUJParnIRGbIhneEPEswJd+oU9rFYw== X-Google-Smtp-Source: ABdhPJwyl2f074RI1qVnwwGqCm+brMJh5HCeZfFEIzBAk9GHD+6nEU5uK7kHGxCOe0HnH7FfNOyI1w== X-Received: by 2002:aa7:d382:: with SMTP id x2mr12701723edq.108.1599998820449; Sun, 13 Sep 2020 05:07:00 -0700 (PDT) Received: from localhost.localdomain ([94.250.162.52]) by smtp.gmail.com with ESMTPSA id e15sm6776894eds.5.2020.09.13.05.06.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Sep 2020 05:06:59 -0700 (PDT) From: Paul B Mahol To: ffmpeg-devel@ffmpeg.org Date: Sun, 13 Sep 2020 14:06:51 +0200 Message-Id: <20200913120651.24961-1-onemda@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH] avfilter/af_amix: do not leave unset PTS for frames after first stream is over X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" First stream is used only to get number of samples to put into each output frame. Signed-off-by: Paul B Mahol --- libavfilter/af_amix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c index cae9d4585a..c4d8916a57 100644 --- a/libavfilter/af_amix.c +++ b/libavfilter/af_amix.c @@ -309,6 +309,8 @@ static int output_frame(AVFilterLink *outlink) } } } + + s->next_pts = frame_list_next_pts(s->frame_list); } else { /* first input closed: use the available samples */ nb_samples = INT_MAX; @@ -324,7 +326,6 @@ static int output_frame(AVFilterLink *outlink) } } - s->next_pts = frame_list_next_pts(s->frame_list); frame_list_remove_samples(s->frame_list, nb_samples); calculate_scales(s, nb_samples);