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 A13F744204 for ; Fri, 5 May 2023 09:09:15 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C2F0E68C17B; Fri, 5 May 2023 12:07:48 +0300 (EEST) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1530368C139 for ; Fri, 5 May 2023 12:07:37 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 3AEA52406CB for ; Fri, 5 May 2023 11:07:35 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id dl0g-E48NaCP for ; Fri, 5 May 2023 11:07:33 +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 27BD92406CA for ; Fri, 5 May 2023 11:07:30 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id D41343A1251 for ; Fri, 5 May 2023 11:07:29 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 5 May 2023 11:07:17 +0200 Message-Id: <20230505090723.24872-5-anton@khirnov.net> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230505090723.24872-1-anton@khirnov.net> References: <20230505090723.24872-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 05/11] fftools/ffmpeg_filter: move InputFilter.eof 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 not used outside of ffmpeg_filter. --- fftools/ffmpeg.h | 2 -- fftools/ffmpeg_filter.c | 7 +++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 525a00bfcb..0231ebc84f 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -292,8 +292,6 @@ typedef struct InputFilter { AVBufferRef *hw_frames_ctx; int32_t *displaymatrix; - - int eof; } InputFilter; typedef struct OutputFilter { diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 3fad38f782..5d9242f476 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -55,6 +55,8 @@ static FilterGraphPriv *fgp_from_fg(FilterGraph *fg) typedef struct InputFilterPriv { InputFilter ifilter; + int eof; + AVRational time_base; AVFifo *frame_queue; @@ -1353,7 +1355,8 @@ int configure_filtergraph(FilterGraph *fg) /* send the EOFs for the finished inputs */ for (i = 0; i < fg->nb_inputs; i++) { - if (fg->inputs[i]->eof) { + InputFilterPriv *ifp = ifp_from_ifilter(fg->inputs[i]); + if (ifp->eof) { ret = av_buffersrc_add_frame(fg->inputs[i]->filter, NULL); if (ret < 0) goto fail; @@ -1500,7 +1503,7 @@ int ifilter_send_eof(InputFilter *ifilter, int64_t pts, AVRational tb) InputFilterPriv *ifp = ifp_from_ifilter(ifilter); int ret; - ifilter->eof = 1; + ifp->eof = 1; if (ifilter->filter) { pts = av_rescale_q_rnd(pts, tb, ifp->time_base, -- 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".