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 BD1DD46158 for ; Mon, 8 May 2023 09:20:56 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CE05068C1EE; Mon, 8 May 2023 12:18:24 +0300 (EEST) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3D2E068C148 for ; Mon, 8 May 2023 12:18:04 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 1ACCF2406CA for ; Mon, 8 May 2023 11:18:02 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id Bti78IfHFOc9 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 683CB2406CD 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 57E693A01C0 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:29 +0200 Message-Id: <20230508091738.20813-13-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 13/22] fftools/ffmpeg_demux: move InputStream.streamcopy_needed 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 | 1 - fftools/ffmpeg_demux.c | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 559381531e..7eb6301c74 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -343,7 +343,6 @@ typedef struct InputStream { int discard; /* true if stream data should be discarded */ int user_set_discard; int decoding_needed; /* non zero if the packets must be decoded in 'raw_fifo', see DECODING_FOR_* */ - int streamcopy_needed; #define DECODING_FOR_OST 1 #define DECODING_FOR_FILTER 2 // should attach FrameData as opaque_ref after decoding diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index ff77f90c9e..d5924c05aa 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -60,6 +60,8 @@ typedef struct DemuxStream { double ts_scale; + int streamcopy_needed; + int wrap_correction_done; int saw_first_ts; ///< dts of the first packet read for this stream (in AV_TIME_BASE units) @@ -346,7 +348,7 @@ static int ist_dts_update(DemuxStream *ds, AVPacket *pkt) } av_assert0(!pkt->opaque_ref); - if (ist->streamcopy_needed) { + if (ds->streamcopy_needed) { DemuxPktData *pd; pkt->opaque_ref = av_buffer_allocz(sizeof(*pd)); @@ -806,10 +808,12 @@ void ifile_close(InputFile **pf) static void ist_use(InputStream *ist, int decoding_needed) { + DemuxStream *ds = ds_from_ist(ist); + ist->discard = 0; ist->st->discard = ist->user_set_discard; ist->decoding_needed |= decoding_needed; - ist->streamcopy_needed |= !decoding_needed; + ds->streamcopy_needed |= !decoding_needed; if (decoding_needed && !avcodec_is_open(ist->dec_ctx)) { int ret = dec_open(ist); -- 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".