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 C048C47184 for ; Thu, 9 Nov 2023 11:41:22 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B07FB68CB8F; Thu, 9 Nov 2023 13:41:19 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3BC2C68C5B3 for ; Thu, 9 Nov 2023 13:41:13 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 949A72404B1 for ; Thu, 9 Nov 2023 12:41:12 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id pe9BnqohrrDU for ; Thu, 9 Nov 2023 12:41:12 +0100 (CET) Received: from lain.khirnov.net (lain.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.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 1542524043D for ; Thu, 9 Nov 2023 12:41:12 +0100 (CET) Received: by lain.khirnov.net (Postfix, from userid 1000) id E1EC01601B9; Thu, 9 Nov 2023 12:41:05 +0100 (CET) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: References: <20231104092125.10213-1-anton@khirnov.net> <20231104092125.10213-15-anton@khirnov.net> Mail-Followup-To: FFmpeg development discussions and patches Date: Thu, 09 Nov 2023 12:41:05 +0100 Message-ID: <169953006589.11195.2105026997611442764@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 14/24] fftools/ffmpeg_mux: move bitstream filtering to the muxer thread 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 (2023-11-04 14:39:44) > On 11/4/2023 4:56 AM, Anton Khirnov wrote: > > This will be the appropriate place for it after the rest of transcoding > > is switched to a threaded architecture. > > --- > > fftools/ffmpeg_mux.c | 112 ++++++++++++++++++++++++++----------------- > > 1 file changed, 67 insertions(+), 45 deletions(-) > > > > diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c > > index 82352b7981..57fb8a8413 100644 > > --- a/fftools/ffmpeg_mux.c > > +++ b/fftools/ffmpeg_mux.c > > @@ -207,6 +207,67 @@ static int sync_queue_process(Muxer *mux, OutputStream *ost, AVPacket *pkt, int > > return 0; > > } > > > > +/* apply the output bitstream filters */ > > +static int mux_packet_filter(Muxer *mux, OutputStream *ost, > > + AVPacket *pkt, int *stream_eof) > > +{ > > + MuxStream *ms = ms_from_ost(ost); > > + const char *err_msg; > > + int ret = 0; > > + > > + if (ms->bsf_ctx) { > > + int bsf_eof = 0; > > + > > + if (pkt) > > + av_packet_rescale_ts(pkt, pkt->time_base, ms->bsf_ctx->time_base_in); > > + > > + ret = av_bsf_send_packet(ms->bsf_ctx, pkt); > > + if (ret < 0) { > > Unrelated to this patch, but this should probably include a comment > about the reason we're not checking for EAGAIN, like we do for > avcodec_send_packet(). Isn't the situation pretty much the same here - seeing EAGAIN would be a bug? -- 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".