From patchwork Tue Oct 11 09:54:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 38688 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp777902pzb; Tue, 11 Oct 2022 02:55:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6uDHoMX79rNzoL6o18DXN5T8/1j2njW/FZU4nWyFKEyzF1mH8pEj2ALLAkqIBQiLehp1sq X-Received: by 2002:a17:907:1623:b0:78d:9e8b:171d with SMTP id hb35-20020a170907162300b0078d9e8b171dmr11306881ejc.309.1665482142120; Tue, 11 Oct 2022 02:55:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665482142; cv=none; d=google.com; s=arc-20160816; b=pP7dbiDZoG3Aq4I4ugTF4hBNDX3TNn3FRE+Ck6thErJm2/6K2vC6M7RFRSyp7wzOPG uoA0DeWzqsbAv27DqIk1izg0+pUyNWKgiGMdIkG49cp9xdpso4YQpFdB0IAMaJ0GFkDe di4GkcARwYz+oOs5UnrZq0dAPXYTOQ9rzsMuR71A3QxM7/NqpEBjUGa8Jhv4jLPr8q/F K6jvpYBU6veszuxcMIRofIijNxp17l9GwHB3XMD+hxzLs3OgrGsORMcTZA6tvj+J95oH OhhHkbTULFuUJlQj1BPSII5hd9gqBN/PJotMTg8TB28XyWcV3DZwLrF0ITpyyOZtRqDp OFdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=wzbmIua134P/ppwMHXfbk9ndauaM8I9sK5rM6ZfwK2s=; b=jKXdndzVC1KM/T8OZJanArGqURqUEpQ5h7fK8seaD52Gp6qDTCT398o3PyK0umSyiq KFxsZsjtL7CxA3tJg1IXD1FC4lTGPme63IwK9RX9E5T8HdaUhcogXHRjT8lvx71yM3tz hbK2GNSXzlat+blooL8xpQPbJfT+9cbLT89SeOqwXmk3MFflY9tFJVY7zc6DbSQNT1JR eFJ1TEr4ihIH8ctpBb9ur/PmparvgpXXoHOJVCCs4IfDZvVSZLvsg2/ioAEKYCv+8oMy lPKPahDkqKC9XQRS8C5GWh5bpOoh+H5Ry0p5fMXEoJ6aOgLWBzW/p9TAclIC9mIAJToq xOUg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id hb31-20020a170907161f00b00781dbeebeb1si14779243ejc.585.2022.10.11.02.55.41; Tue, 11 Oct 2022 02:55:42 -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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C2F6068BC90; Tue, 11 Oct 2022 12:55:09 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 590A768BC72 for ; Tue, 11 Oct 2022 12:55:00 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id CE7D92404F8 for ; Tue, 11 Oct 2022 11:54:59 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id c4DXFAr-iK-D for ; Tue, 11 Oct 2022 11:54:57 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id D7FC32400F4 for ; Tue, 11 Oct 2022 11:54:57 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 61A933A00FF for ; Tue, 11 Oct 2022 11:54:55 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Tue, 11 Oct 2022 11:54:41 +0200 Message-Id: <20221011095445.27001-1-anton@khirnov.net> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/5] lavfi/vf_framepack: properly set output duration for framesequence output 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: s4yIsQgaY0Fv Output has to be CFR in this case. --- libavfilter/vf_framepack.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_framepack.c b/libavfilter/vf_framepack.c index f30909ccff..6ea88df8b2 100644 --- a/libavfilter/vf_framepack.c +++ b/libavfilter/vf_framepack.c @@ -329,8 +329,10 @@ static int try_push_frame(AVFilterContext *ctx) for (i = 0; i < 2; i++) { // set correct timestamps - if (pts != AV_NOPTS_VALUE) + if (pts != AV_NOPTS_VALUE) { s->input_views[i]->pts = i == 0 ? pts * 2 : pts * 2 + av_rescale_q(1, av_inv_q(outlink->frame_rate), outlink->time_base); + s->input_views[i]->duration = av_rescale_q(1, av_inv_q(outlink->frame_rate), outlink->time_base); + } // set stereo3d side data stereo = av_stereo3d_create_side_data(s->input_views[i]);