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 6BA574BC8C for ; Mon, 25 Aug 2025 10:26:38 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 32AA268B0A0; Mon, 25 Aug 2025 13:26:34 +0300 (EEST) Received: from out203-205-221-242.mail.qq.com (out203-205-221-242.mail.qq.com [203.205.221.242]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 186696802A4 for ; Mon, 25 Aug 2025 13:26:26 +0300 (EEST) Received: from smtpclient.apple ([240e:3b7:3275:6a90:3c5:aab8:cd91:a9d8]) by newxmesmtplogicsvrsza36-0.qq.com (NewEsmtp) with SMTP id 69486C2B; Mon, 25 Aug 2025 18:26:20 +0800 X-QQ-mid: xmsmtpt1756117580t1rpug4e4 Message-ID: X-QQ-XMAILINFO: NECEKZKWSsLPkGUud4C+AKRKXzF7JHiGuh/H9uK0bpiKVWBUQZqI/F7D46sqzr it5FrHCspjV9bJI3VGLyiuhgqtFVjp700kdzZEW6/mGLyFxLMsUOag5y+x851KBRA0WdqA168av6 RbIkY8APAwNqT7MiWC5Eoep0TDsJWk8EMC7XakupUCCqQYiunUSa6qiAN9BpG8YImEGiWTxNa0Vc ng7hFqZLmDyLXWLt3Ithj65m0R3sidV5bhEkm+gORS3sxlolWwwEL7U7d8kSF+kvMh/lzTTtm/XM eogruvjKSUfvEwbytI7p/9vTorLfRQ8oZw7veZs0ecFsoIBpJ7qig3ii6U05ubteVnsLTkUrhyFF bMxGOFTAAK+O845frYbNm8/K+kvqo9ak8tKIl+9VeqvYxZjLVyuG++57MlauZDuxBWVBGAZo0Uge 6SEo51439nbrPyQhx+mFrSRj2haRaBeRjSzOF7idLhYOWQb6TDGP/Q5Qmq0gkHSBaX4fEtjZYgZj vFQOvA1pdDq7yYlGFUeodDJT0CMUZxj++HA69hmhhxOUboPxEoKF0sxO/YkLvrc5I11wBSEumlss X+XDou6FNrU6RLoGF4TTbzROJQ5JILAFm2STQH1+0DyMx16nO0kzSVnaNJiboM2SYOLQGD7KMCpW kSlMc4nonCIS0hZpXhnrPi07T4oCYxERKZmx3cXjHsWyvcJFJmfjOo4/P1e0RLltm78ZQMyHGcgW fjkGnzfqobwkADmQLX82tCH15ynneni+WtIussOs5up90m99Hb2ztoWAEXuz6ZiacNRWUHTm+WY/ WIJ5D14OulVI0v1RdGU1b24wi54ueZByd8SHyoZXi2J9AsRXInADDC5kiPZdBYi8RxzOEUoOhx5v 06bCPs24dtxjaiJ4stGgV1OJdMy+dBnhRJfumJabJZ6jkX2F3Tiy7vP9zYYIc4exCRd3iUDCTwkh myOGebMXIV0Wk2cKEf1qJYvd5rCdOh3wnY1n2cBgCv0PsSHY9G+fjda9ecDqfSQ0NHCF9fzI3t9s yOX+luCnkTCkg5BonBkWhhKIA6/iE= X-QQ-XMRINFO: Nq+8W0+stu50PRdwbJxPCL0= Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3818.100.11.1.3\)) In-Reply-To: Date: Mon, 25 Aug 2025 18:26:10 +0800 X-OQ-MSGID: References: To: FFmpeg development discussions and patches X-Mailer: Apple Mail (2.3818.100.11.1.3) Subject: Re: [FFmpeg-devel] [PATCH] 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: , From: Zhao Zhili via ffmpeg-devel Reply-To: FFmpeg development discussions and patches Cc: Zhao Zhili , 1441923451@qq.com 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: > On Jul 31, 2025, at 17:05, 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..856a6cbd0a 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 }, > { NULL } > }; > > @@ -313,7 +315,7 @@ static int file_open(URLContext *h, const char *filename, int flags) > /* Buffer writes more than the default 32k to improve throughput especially > * with networked file systems */ > if (!h->is_streamed && flags & AVIO_FLAG_WRITE) > - h->min_packet_size = h->max_packet_size = 262144; > + h->min_packet_size = h->max_packet_size = c->pkt_size; > > if (c->seekable >= 0) > h->is_streamed = !c->seekable; > -- Pushed after rewords on the commit message. _______________________________________________ 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".