From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 05/18] avformat/whip: fix format string for printing size_t
Date: Thu, 3 Jul 2025 20:03:43 +0200
Message-ID: <AS8P250MB0744B5FC63798719B1D7B21C8F43A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <a5a58da9-9b0b-4236-9e0e-ee46d7ba25b1@rothenpieler.org>
Timo Rothenpieler:
> On 03.07.2025 19:16, Andreas Rheinhardt wrote:
>> Timo Rothenpieler:
>>> ---
>>> libavformat/whip.c | 6 +++---
>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/libavformat/whip.c b/libavformat/whip.c
>>> index 7cd3f48ba9..71c667cd31 100644
>>> --- a/libavformat/whip.c
>>> +++ b/libavformat/whip.c
>>> @@ -926,7 +926,7 @@ static int parse_answer(AVFormatContext *s)
>>> if (whip->state < WHIP_STATE_NEGOTIATED)
>>> whip->state = WHIP_STATE_NEGOTIATED;
>>> whip->whip_answer_time = av_gettime();
>>> - av_log(whip, AV_LOG_VERBOSE, "SDP state=%d, offer=%luB,
>>> answer=%luB, ufrag=%s, pwd=%luB, transport=%s://%s:%d, elapsed=%dms\n",
>>> + av_log(whip, AV_LOG_VERBOSE, "SDP state=%d, offer=%zuB,
>>> answer=%zuB, ufrag=%s, pwd=%zuB, transport=%s://%s:%d, elapsed=%dms\n",
>>> whip->state, strlen(whip->sdp_offer), strlen(whip-
>>> >sdp_answer), whip->ice_ufrag_remote, strlen(whip->ice_pwd_remote),
>>> whip->ice_protocol, whip->ice_host, whip->ice_port,
>>> ELAPSED(whip->whip_starttime, av_gettime()));
>>> @@ -977,7 +977,7 @@ static int ice_create_request(AVFormatContext
>>> *s, uint8_t *buf, int buf_size, in
>>> /* The username is the concatenation of the two ICE ufrag */
>>> ret = snprintf(username, sizeof(username), "%s:%s", whip-
>>> >ice_ufrag_remote, whip->ice_ufrag_local);
>>> if (ret <= 0 || ret >= sizeof(username)) {
>>> - av_log(whip, AV_LOG_ERROR, "Failed to build username %s:%s,
>>> max=%lu, ret=%d\n",
>>> + av_log(whip, AV_LOG_ERROR, "Failed to build username %s:%s,
>>> max=%zu, ret=%d\n",
>>> whip->ice_ufrag_remote, whip->ice_ufrag_local,
>>> sizeof(username), ret);
>>> ret = AVERROR(EIO);
>>> goto end;
>>> @@ -1420,7 +1420,7 @@ static int setup_srtp(AVFormatContext *s)
>>> if (whip->state < WHIP_STATE_SRTP_FINISHED)
>>> whip->state = WHIP_STATE_SRTP_FINISHED;
>>> whip->whip_srtp_time = av_gettime();
>>> - av_log(whip, AV_LOG_VERBOSE, "SRTP setup done, state=%d,
>>> suite=%s, key=%luB, elapsed=%dms\n",
>>> + av_log(whip, AV_LOG_VERBOSE, "SRTP setup done, state=%d,
>>> suite=%s, key=%zuB, elapsed=%dms\n",
>>> whip->state, suite, sizeof(send_key), ELAPSED(whip-
>>> >whip_starttime, av_gettime()));
>>> end:
>>
>> Why not SIZE_SPECIFIER?
>
> According to C99, %zu is the format specifier for size_t, so should work
> everywhere?
IIRC some version of MSVCRT doesn't support it nevertheless. I don't
know whether we still support it, though.
- Andreas
_______________________________________________
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".
next prev parent reply other threads:[~2025-07-03 18:03 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-02 16:56 [FFmpeg-devel] [PATCH 00/18] WHIP + TLS + UDP fixes and SChannel DTLS support Timo Rothenpieler
2025-07-02 16:56 ` [FFmpeg-devel] [PATCH 01/18] avformat/Makefile: don't hardcode openssl for whip muxer Timo Rothenpieler
2025-07-03 14:00 ` Steven Liu
2025-07-03 20:20 ` Timo Rothenpieler
2025-07-02 16:56 ` [FFmpeg-devel] [PATCH 02/18] avformat/whip: use av_dict_set_int for int Timo Rothenpieler
2025-07-03 14:01 ` Steven Liu
2025-07-02 16:56 ` [FFmpeg-devel] [PATCH 03/18] avformat/whip: don't leak options dict Timo Rothenpieler
2025-07-03 14:02 ` Steven Liu
2025-07-02 16:56 ` [FFmpeg-devel] [PATCH 04/18] avformat/whip: remove redundant WHIP: prefix from all logging Timo Rothenpieler
2025-07-03 14:02 ` Steven Liu
2025-07-02 16:56 ` [FFmpeg-devel] [PATCH 05/18] avformat/whip: fix format string for printing size_t Timo Rothenpieler
2025-07-03 14:03 ` Steven Liu
2025-07-03 17:16 ` Andreas Rheinhardt
2025-07-03 17:54 ` Timo Rothenpieler
2025-07-03 18:03 ` Andreas Rheinhardt [this message]
2025-07-03 18:14 ` Timo Rothenpieler
2025-07-02 16:56 ` [FFmpeg-devel] [PATCH 06/18] avformat/tls: use non protocol specific error message Timo Rothenpieler
2025-07-03 14:03 ` Steven Liu
2025-07-02 16:56 ` [FFmpeg-devel] [PATCH 07/18] avformat/tls: don't use http_proxy for udp sockets Timo Rothenpieler
2025-07-03 14:04 ` Steven Liu
2025-07-02 16:56 ` [FFmpeg-devel] [PATCH 08/18] avformat/tls: move openssl specific init out of generic code Timo Rothenpieler
2025-07-03 1:07 ` Jack Lau
2025-07-03 14:24 ` Timo Rothenpieler
2025-07-03 15:22 ` Jack Lau
2025-07-03 16:41 ` Timo Rothenpieler
2025-07-02 16:56 ` [FFmpeg-devel] [PATCH 09/18] avformat/udp: don't override 0 localport Timo Rothenpieler
2025-07-03 14:05 ` Steven Liu
2025-07-02 16:56 ` [FFmpeg-devel] [PATCH 10/18] avformat/tls: fix udp init Timo Rothenpieler
2025-07-03 14:06 ` Steven Liu
2025-07-02 16:56 ` [FFmpeg-devel] [PATCH 11/18] avformat/udp: make recv addr of each packet available Timo Rothenpieler
2025-07-02 16:56 ` [FFmpeg-devel] [PATCH 12/18] avformat/udp: separate rx and tx fifo Timo Rothenpieler
2025-07-03 14:07 ` Steven Liu
2025-07-02 16:56 ` [FFmpeg-devel] [PATCH 13/18] avformat/udp: add function to set remote address directly Timo Rothenpieler
2025-07-02 16:56 ` [FFmpeg-devel] [PATCH 14/18] avformat/tls: remove unused fingerprint option Timo Rothenpieler
2025-07-02 16:56 ` [FFmpeg-devel] [PATCH 15/18] avformat/tls: clean up new whip options Timo Rothenpieler
2025-07-02 16:56 ` [FFmpeg-devel] [PATCH 16/18] avformat/tls: make passing an external socket universal Timo Rothenpieler
2025-07-02 16:56 ` [FFmpeg-devel] [PATCH 17/18] avformat/tls_openssl: use existing context handle Timo Rothenpieler
2025-07-02 16:56 ` [FFmpeg-devel] [PATCH 18/18] avformat/tls_schannel: add DTLS support Timo Rothenpieler
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=AS8P250MB0744B5FC63798719B1D7B21C8F43A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM \
--to=andreas.rheinhardt@outlook.com \
--cc=ffmpeg-devel@ffmpeg.org \
/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