From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 2E3F04A3FE for ; Thu, 17 Jul 2025 14:27:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 8147968F07E; Thu, 17 Jul 2025 17:27:30 +0300 (EEST) Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id CBD5C68F062 for ; Thu, 17 Jul 2025 17:27:23 +0300 (EEST) Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4bjZy06zdFz9t7s for ; Thu, 17 Jul 2025 16:27:20 +0200 (CEST) Message-ID: <17547fea-4e8f-4ba2-b439-6a17139f70e5@gyani.pro> Date: Thu, 17 Jul 2025 19:57:17 +0530 MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org References: Content-Language: en-US From: Gyan Doshi In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 1/1] add option in file.c: pkt_size to set max_packet_size 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 2025-07-17 07:35 pm, yangsen5 via ffmpeg-devel wrote: > From: yangsen5 <1441923451@qq.com> > > Signed-off-by: yangsen5 <1441923451@qq.com> > --- > libavformat/file.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/libavformat/file.c b/libavformat/file.c > index 6a66040b65..8099a7e931 100644 > --- a/libavformat/file.c > +++ b/libavformat/file.c > @@ -94,6 +94,7 @@ typedef struct FileContext { > int fd; > int trunc; > int blocksize; > + int pkt_size; > int follow; > int seekable; > #if HAVE_DIRENT_H > @@ -106,6 +107,7 @@ static const AVOption file_options[] = { > { "blocksize", "set I/O operation maximum block size", offsetof(FileContext, blocksize), AV_OPT_TYPE_INT, { .i64 = INT_MAX }, 1, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM }, > { "follow", "Follow a file as it is being written", offsetof(FileContext, follow), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, AV_OPT_FLAG_DECODING_PARAM }, > { "seekable", "Sets if the file is seekable", offsetof(FileContext, seekable), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 0, AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, > + { "pkt_size", "Maximum file packet size", offsetof(FileContext, pkt_size), AV_OPT_TYPE_INT, { .i64 = 262144 }, -1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, I see naive assignment of the value in avio*.c What happens if someone sets the value to -1? Regards, Gyan _______________________________________________ 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".