From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org>
Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100])
	by master.gitmailbox.com (Postfix) with ESMTPS id 9FF724E6AA
	for <ffmpegdev@gitmailbox.com>; Thu, 13 Mar 2025 20:01:59 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CC2F368CF45;
	Thu, 13 Mar 2025 22:01:54 +0200 (EET)
Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A4FEC68CEF6
 for <ffmpeg-devel@ffmpeg.org>; Thu, 13 Mar 2025 22:01:47 +0200 (EET)
Received: from localhost (localhost [127.0.0.1])
 by iq.passwd.hu (Postfix) with ESMTP id CD325EB239
 for <ffmpeg-devel@ffmpeg.org>; Thu, 13 Mar 2025 21:03:04 +0100 (CET)
X-Virus-Scanned: amavisd-new at passwd.hu
Received: from iq.passwd.hu ([127.0.0.1])
 by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id h78Lt5D5xZ5b for <ffmpeg-devel@ffmpeg.org>;
 Thu, 13 Mar 2025 21:03:03 +0100 (CET)
Received: from iq (iq [217.27.212.140])
 by iq.passwd.hu (Postfix) with ESMTPS id 0338AEB236
 for <ffmpeg-devel@ffmpeg.org>; Thu, 13 Mar 2025 21:03:03 +0100 (CET)
Date: Thu, 13 Mar 2025 21:03:02 +0100 (CET)
From: Marton Balint <cus@passwd.hu>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
In-Reply-To: <tencent_699C644BBC660F50B6E6EB27F7AA8D930106@qq.com>
Message-ID: <abc7195a-fed8-09ad-b4b8-4ddc7c831737@passwd.hu>
References: <tencent_699C644BBC660F50B6E6EB27F7AA8D930106@qq.com>
MIME-Version: 1.0
Subject: Re: [FFmpeg-devel] [PATCH] avformat/avio: Add max_pkt_size option
X-BeenThere: ffmpeg-devel@ffmpeg.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org>
List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe>
List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel>
List-Post: <mailto:ffmpeg-devel@ffmpeg.org>
List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help>
List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe>
Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
Archived-At: <https://master.gitmailbox.com/ffmpegdev/abc7195a-fed8-09ad-b4b8-4ddc7c831737@passwd.hu/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>



On Thu, 13 Mar 2025, Zhao Zhili wrote:

> From: Zhao Zhili <zhilizhao@tencent.com>
>
> Optimizing memory footprint in memory-constrained systems.
>
> Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
> ---
> libavformat/avio.c    | 2 ++
> libavformat/version.h | 2 +-
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/libavformat/avio.c b/libavformat/avio.c
> index d109f3adff..e1b959ed73 100644
> --- a/libavformat/avio.c
> +++ b/libavformat/avio.c
> @@ -61,6 +61,8 @@ static const AVOption options[] = {
>     {"protocol_whitelist", "List of protocols that are allowed to be used", OFFSET(protocol_whitelist), AV_OPT_TYPE_STRING, { .str = NULL },  0, 0, D },
>     {"protocol_blacklist", "List of protocols that are not allowed to be used", OFFSET(protocol_blacklist), AV_OPT_TYPE_STRING, { .str = NULL },  0, 0, D },
>     {"rw_timeout", "Timeout for IO operations (in microseconds)", offsetof(URLContext, rw_timeout), AV_OPT_TYPE_INT64, { .i64 = 0 }, 0, INT64_MAX, AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_DECODING_PARAM },
> +    {"max_pkt_size", "Default maximum packet size in bytes, could be overwritten by particular protocol",
> +            offsetof(URLContext, max_packet_size), AV_OPT_TYPE_INT, { .i64 = IO_BUFFER_SIZE }, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_DECODING_PARAM },
>     { NULL }
> };


This feels super confusing. A *max_packet_size* option which might not do 
anything at all depending on the protocol the user is using, and which 
the user might override with the protocol specific *pkt_size* option if it 
exists. So I'd rather not expose ->max_pkt_size like that.

Regards,
Marton


>
> diff --git a/libavformat/version.h b/libavformat/version.h
> index 6ffdf61b43..e1ab967f5b 100644
> --- a/libavformat/version.h
> +++ b/libavformat/version.h
> @@ -32,7 +32,7 @@
> #include "version_major.h"
>
> #define LIBAVFORMAT_VERSION_MINOR   9
> -#define LIBAVFORMAT_VERSION_MICRO 107
> +#define LIBAVFORMAT_VERSION_MICRO 108
>
> #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
>                                                LIBAVFORMAT_VERSION_MINOR, \
> -- 
> 2.46.0
>
> _______________________________________________
> 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".
>
_______________________________________________
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".