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 B89E9411AE for ; Tue, 15 Feb 2022 11:41:32 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7672668B279; Tue, 15 Feb 2022 13:41:29 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C6F2B68B06F for ; Tue, 15 Feb 2022 13:41:22 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 45FD1240179 for ; Tue, 15 Feb 2022 12:41:22 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id leVSXxRdOvfe for ; Tue, 15 Feb 2022 12:41:20 +0100 (CET) Received: from lain.red.khirnov.net (lain.red.khirnov.net [IPv6:2001:67c:1138:4306::3]) (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 "lain.red.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id C2A4C240175 for ; Tue, 15 Feb 2022 12:41:20 +0100 (CET) Received: by lain.red.khirnov.net (Postfix, from userid 1000) id 638F11601AD; Tue, 15 Feb 2022 12:41:17 +0100 (CET) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <20220214224156.39862-4-jamrial@gmail.com> References: <20220214224156.39862-1-jamrial@gmail.com> <20220214224156.39862-4-jamrial@gmail.com> Mail-Followup-To: FFmpeg development discussions and patches Date: Tue, 15 Feb 2022 12:41:17 +0100 Message-ID: <164492527737.9519.8869846058577360420@lain.red.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 4/6] ffmpeg: don't skip packets before a keyframe was seen if a bsf with delay is used 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: Quoting James Almer (2022-02-14 23:41:54) > A keyframe could be buffered in the bsf and not be output until more packets > had been fed to it. > > Signed-off-by: James Almer > --- > fftools/ffmpeg.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c > index 6aa0986f02..48d9016b4c 100644 > --- a/fftools/ffmpeg.c > +++ b/fftools/ffmpeg.c > @@ -2026,7 +2026,8 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p > } > > if ((!ost->frame_number && !(pkt->flags & AV_PKT_FLAG_KEY)) && > - !ost->copy_initial_nonkeyframes) > + !ost->copy_initial_nonkeyframes && > + !(ost->bsf_ctx && ost->bsf_ctx->filter->capabilities & AV_BSF_CAP_DELAY)) > return; Wouldn't it be simpler to add an OutputStream field that tracks whether we've seen a keyframe packet yet? No new API required. -- Anton Khirnov _______________________________________________ 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".