Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Zhao Zhili via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: Zhao Zhili <quinkblack@foxmail.com>, 1441923451@qq.com
Subject: Re: [FFmpeg-devel] [PATCH] add option in file.c: pkt_size to set max_packet_size
Date: Mon, 25 Aug 2025 18:26:10 +0800
Message-ID: <tencent_982EAC254B131E684193E11375F5D0C91105@qq.com> (raw)
In-Reply-To: <tencent_0E28CBDB0F3C592D7030290AABBF1EBBA306@qq.com>



> On Jul 31, 2025, at 17:05, yangsen5 via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> 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".

      reply	other threads:[~2025-08-25 10:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-17 14:05 [FFmpeg-devel] [PATCH 1/1] " yangsen5 via ffmpeg-devel
2025-07-17 14:27 ` Gyan Doshi
     [not found]   ` <tencent_F5DB935EB016EAA13A72B320FCBC9331010A@qq.com>
2025-07-31  8:16     ` [FFmpeg-devel] [PATCH 1/1] add option in file.c: pkt_size toset max_packet_size Gyan Doshi
2025-07-17 15:01 ` [FFmpeg-devel] [PATCH 1/1] add option in file.c: pkt_size to set max_packet_size Zhao Zhili
2025-07-31  5:16   ` [FFmpeg-devel] [PATCH 1/1] add option in file.c: pkt_size to setmax_packet_size 1+1=10 via ffmpeg-devel
2025-07-31  5:47   ` 1+1=10 via ffmpeg-devel
2025-07-31  9:05 ` [FFmpeg-devel] [PATCH] add option in file.c: pkt_size to set max_packet_size yangsen5 via ffmpeg-devel
2025-08-25 10:26   ` Zhao Zhili via ffmpeg-devel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_982EAC254B131E684193E11375F5D0C91105@qq.com \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=1441923451@qq.com \
    --cc=quinkblack@foxmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git