From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 3820245A1F for ; Sun, 9 Apr 2023 14:11:44 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3A44768BE3D; Sun, 9 Apr 2023 17:09:34 +0300 (EEST) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 945B268BD38 for ; Sun, 9 Apr 2023 17:09:20 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 632832404EC for ; Sun, 9 Apr 2023 16:09:20 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 1-oR9zG5k3Ne for ; Sun, 9 Apr 2023 16:09:19 +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 06119240D21 for ; Sun, 9 Apr 2023 16:09:11 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id EB6A13A03E5 for ; Sun, 9 Apr 2023 16:09:10 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Sun, 9 Apr 2023 16:08:51 +0200 Message-Id: <20230409140853.28858-27-anton@khirnov.net> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230409140853.28858-1-anton@khirnov.net> References: <20230409140853.28858-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 27/29] fftools/ffmpeg: only set InputStream.next_pts for decoding 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: It is write-only for streamcopy. --- fftools/ffmpeg.c | 3 +-- fftools/ffmpeg.h | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index f905836af6..4d4083d474 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -1670,7 +1670,7 @@ static int process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eo if (pkt && pkt->dts != AV_NOPTS_VALUE) { ist->next_dts = ist->dts = av_rescale_q(pkt->dts, ist->st->time_base, AV_TIME_BASE_Q); if (par->codec_type != AVMEDIA_TYPE_VIDEO || !ist->decoding_needed) - ist->next_pts = ist->pts = ist->dts; + ist->pts = ist->dts; } // while we have more to decode or while the decoder did output something on EOF @@ -1811,7 +1811,6 @@ static int process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eo break; } ist->pts = ist->dts; - ist->next_pts = ist->next_dts; } else if (!ist->decoding_needed) eof_reached = 1; diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index aef2bbc0df..50e5858385 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -370,7 +370,8 @@ typedef struct InputStream { int64_t first_dts; ///< dts of the first packet read for this stream (in AV_TIME_BASE units) int64_t dts; ///< dts of the last packet read for this stream (in AV_TIME_BASE units) - int64_t next_pts; ///< synthetic pts for the next decode frame (in AV_TIME_BASE units) + /* predicted pts of the next decoded frame, in AV_TIME_BASE */ + int64_t next_pts; int64_t pts; ///< current pts of the decoded frame (in AV_TIME_BASE units) int wrap_correction_done; -- 2.39.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".