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 BB4F546147 for ; Mon, 8 May 2023 09:20:31 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F07D568C1DE; Mon, 8 May 2023 12:18:21 +0300 (EEST) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C58B668C16B for ; Mon, 8 May 2023 12:18:03 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 80D582404F8 for ; Mon, 8 May 2023 11:18:01 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id wnThQOKD1nqF for ; Mon, 8 May 2023 11:18:01 +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 5B2852406CA for ; Mon, 8 May 2023 11:17:57 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 4C21D3A048F for ; Mon, 8 May 2023 11:17:57 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 8 May 2023 11:17:28 +0200 Message-Id: <20230508091738.20813-12-anton@khirnov.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230508091738.20813-1-anton@khirnov.net> References: <20230508091738.20813-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 12/22] fftools/ffmpeg_demux: move InputStream.wrap_correction_done to private data 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 no longer used outside of ffmpeg_demux. --- fftools/ffmpeg.h | 2 -- fftools/ffmpeg_demux.c | 9 +++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index b8c0e7db84..559381531e 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -373,8 +373,6 @@ typedef struct InputStream { AVRational last_frame_tb; int last_frame_sample_rate; - int wrap_correction_done; - int64_t filter_in_rescale_delta_last; // when forcing constant input framerate through -r, diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index 7e34292b3a..ff77f90c9e 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -60,6 +60,7 @@ typedef struct DemuxStream { double ts_scale; + int wrap_correction_done; int saw_first_ts; ///< dts of the first packet read for this stream (in AV_TIME_BASE units) int64_t first_dts; @@ -383,21 +384,21 @@ static int ts_fixup(Demuxer *d, AVPacket *pkt) SHOW_TS_DEBUG("demuxer"); - if (!ist->wrap_correction_done && start_time != AV_NOPTS_VALUE && + if (!ds->wrap_correction_done && start_time != AV_NOPTS_VALUE && ist->st->pts_wrap_bits < 64) { int64_t stime, stime2; stime = av_rescale_q(start_time, AV_TIME_BASE_Q, pkt->time_base); stime2= stime + (1ULL<st->pts_wrap_bits); - ist->wrap_correction_done = 1; + ds->wrap_correction_done = 1; if(stime2 > stime && pkt->dts != AV_NOPTS_VALUE && pkt->dts > stime + (1LL<<(ist->st->pts_wrap_bits-1))) { pkt->dts -= 1ULL<st->pts_wrap_bits; - ist->wrap_correction_done = 0; + ds->wrap_correction_done = 0; } if(stime2 > stime && pkt->pts != AV_NOPTS_VALUE && pkt->pts > stime + (1LL<<(ist->st->pts_wrap_bits-1))) { pkt->pts -= 1ULL<st->pts_wrap_bits; - ist->wrap_correction_done = 0; + ds->wrap_correction_done = 0; } } -- 2.39.2 _______________________________________________ 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".