From patchwork Wed Jul 13 09:17:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 36775 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:6da0:b0:8b:e47:9dbf with SMTP id wl32csp226279pzb; Wed, 13 Jul 2022 02:19:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uoB9Nbr056AQ1JFBUiFC4dnfeuMhtf+ZvuW0IImoCHAEFEwthP88aGPzdAQuW2U8Av/I0I X-Received: by 2002:a17:906:dc8c:b0:726:e51b:d5c3 with SMTP id cs12-20020a170906dc8c00b00726e51bd5c3mr2353738ejc.369.1657703945398; Wed, 13 Jul 2022 02:19:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657703945; cv=none; d=google.com; s=arc-20160816; b=SNpWkfuzsZa+E56UXm9hgAvr68miaUlsMZ0KvXIxhIb9SD4NF4LWl7CzpTDfKWoBi1 VPsBEZIFDh3Q33gbCuYe4y+z28CjG2SyZ9v5G07MaaFojLomjePX6WxtmDIECqwH6Mtg J7HwRIzZq8wQo/pbA6pTGno+Wlj4Pqho+CvYmCsf7ZBf34JHOrkR2+M8GHmwO/vUIUQb RRfKfCtSsnXhqE1JOAy+I2r179cEPNYixF2oLWbm5a7xXecJsnOa6jgGKYccyuU6S8z5 fL2rKDhvInHxBguins2OEUeZ0qDaBdcjAsnEDci+pJJ+o3c6tEOsRR4tpUgtUd+d02fP yiwQ== 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:references:in-reply-to:message-id :date:to:from:delivered-to; bh=lVaTTxfd80ZhS9DVjXht4SrgEN7IyqoCBjhG+w8np3A=; b=sEdFNlGDpJUwoFvapuDYylR+tXOEidVAyVTmYXYBJvoHgMttIm5gCRVf5pCGUmsDFd NM8GK7U9VZH3HUterNBb0nbBeqwt+rY4U3vzw/0eP4p+cPGaKEBg19qnEy15W/2KOluE n+I62GeGR8ndOOqas7IelQ56osbV2c2J5NbR9B15B8P7Q5vVcXQdVafYAt9bh5g3SBjQ Ui2QfBTSYD2Op263NKDlOLQLThC4vaTz1ukrY31Jv7dj6S8p9hHB50iE6RX0UZrInCQK zdlb2JpBkM3Goap73yoGjMkss7XQTYUJfm5oeyaOcXNAewcF1FO8m6UYOLj6E4OS9SsF K3xg== 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 ee43-20020a056402292b00b0043a71bf3999si1605978edb.57.2022.07.13.02.19.04; Wed, 13 Jul 2022 02:19:05 -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 675B368B9B5; Wed, 13 Jul 2022 12:17:46 +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 11C4668B95B for ; Wed, 13 Jul 2022 12:17:37 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id D4C20240511 for ; Wed, 13 Jul 2022 11:17:33 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id VYaVARmDgTcZ for ; Wed, 13 Jul 2022 11:17:32 +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 2128424050B for ; Wed, 13 Jul 2022 11:17:29 +0200 (CEST) Received: by libav.khirnov.net (Postfix, from userid 1000) id E26953A0396; Wed, 13 Jul 2022 11:17:27 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Wed, 13 Jul 2022 11:17:23 +0200 Message-Id: <20220713091725.16638-7-anton@khirnov.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220713091725.16638-1-anton@khirnov.net> References: <20220713091725.16638-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 7/9] ffmpeg: use AVFrame.duration instead of AVFrame.pkt_duration 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: yqCSt2wyunNC --- fftools/ffmpeg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index e7384f052a..effcfa1b91 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -1107,8 +1107,8 @@ static void do_video_out(OutputFile *of, (nb_filtergraphs == 0 || !filtergraphs[0]->graph_desc) && next_picture && ist && - lrintf(next_picture->pkt_duration * av_q2d(ist->st->time_base) / av_q2d(enc->time_base)) > 0) { - duration = lrintf(next_picture->pkt_duration * av_q2d(ist->st->time_base) / av_q2d(enc->time_base)); + lrintf(next_picture->duration * av_q2d(ist->st->time_base) / av_q2d(enc->time_base)) > 0) { + duration = lrintf(next_picture->duration * av_q2d(ist->st->time_base) / av_q2d(enc->time_base)); } if (!next_picture) { @@ -2229,7 +2229,7 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output, int64_ ist->hwaccel_retrieved_pix_fmt = decoded_frame->format; best_effort_timestamp= decoded_frame->best_effort_timestamp; - *duration_pts = decoded_frame->pkt_duration; + *duration_pts = decoded_frame->duration; if (ist->framerate.num) best_effort_timestamp = ist->cfr_next_pts++;