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 11E0E44D97 for ; Sat, 25 Mar 2023 19:16:12 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D9D0268C952; Sat, 25 Mar 2023 21:16:08 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5487C68C810 for ; Sat, 25 Mar 2023 21:16:02 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 8796E240D1D for ; Sat, 25 Mar 2023 20:16:01 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id JpwyWwpavVy0 for ; Sat, 25 Mar 2023 20:16:00 +0100 (CET) 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 D5C0C240178 for ; Sat, 25 Mar 2023 20:16:00 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 583653A00B6 for ; Sat, 25 Mar 2023 20:15:54 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Sat, 25 Mar 2023 20:15:07 +0100 Message-Id: <20230325191529.10578-1-anton@khirnov.net> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 01/23] fftools/ffmpeg: drop InputStream.processing_needed 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 equivalent to !InputStream.discard. --- fftools/ffmpeg.c | 4 ++-- fftools/ffmpeg.h | 1 - fftools/ffmpeg_filter.c | 1 - fftools/ffmpeg_mux_init.c | 3 --- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 438bee8fef..aa9284ecd5 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -3648,7 +3648,7 @@ static void decode_flush(InputFile *ifile) InputStream *ist = ifile->streams[i]; int ret; - if (!ist->processing_needed) + if (ist->discard) continue; do { @@ -3793,7 +3793,7 @@ static int process_input(int file_index) for (i = 0; i < ifile->nb_streams; i++) { ist = ifile->streams[i]; - if (ist->processing_needed) { + if (!ist->discard) { ret = process_input_packet(ist, NULL, 0); if (ret>0) return 0; diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 823218e214..791deedc07 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -342,7 +342,6 @@ typedef struct InputStream { int decoding_needed; /* non zero if the packets must be decoded in 'raw_fifo', see DECODING_FOR_* */ #define DECODING_FOR_OST 1 #define DECODING_FOR_FILTER 2 - int processing_needed; /* non zero if the packets must be processed */ // should attach FrameData as opaque_ref after decoding int want_frame_data; diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 4fde120067..314b89b585 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -296,7 +296,6 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in) ist->discard = 0; ist->decoding_needed |= DECODING_FOR_FILTER; - ist->processing_needed = 1; ist->st->discard = AVDISCARD_NONE; ifilter = ALLOC_ARRAY_ELEM(fg->inputs, fg->nb_inputs); diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index 09d24ba8e5..ebc17059f9 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -2283,7 +2283,6 @@ int of_open(const OptionsContext *o, const char *filename) if (ost->enc_ctx && ost->ist) { InputStream *ist = ost->ist; ist->decoding_needed |= DECODING_FOR_OST; - ist->processing_needed = 1; if (ost->st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO || ost->st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) { @@ -2294,8 +2293,6 @@ int of_open(const OptionsContext *o, const char *filename) exit_program(1); } } - } else if (ost->ist) { - ost->ist->processing_needed = 1; } /* set the filter output constraints */ -- 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".