From 0e7f39a3d3be497a8053fc584a7982fca6210eff Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 17 Mar 2025 11:02:35 +0100 Subject: [PATCH] rtp-sdp: format ptime in the C locale Don't place locale dependent strings in the SDP. Fixes #4615 --- src/modules/module-rtp-sap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/module-rtp-sap.c b/src/modules/module-rtp-sap.c index 2ed466b76..796c95a0d 100644 --- a/src/modules/module-rtp-sap.c +++ b/src/modules/module-rtp-sap.c @@ -636,7 +636,7 @@ static void update_ts_refclk(struct impl *impl) static int send_sap(struct impl *impl, struct session *sess, bool bye) { - char buffer[2048], src_addr[64], dst_addr[64], dst_ttl[8]; + char buffer[2048], src_addr[64], dst_addr[64], dst_ttl[8], ptime[32]; const char *user_name; struct sockaddr *sa = (struct sockaddr*)&impl->src_addr; struct sap_header header; @@ -734,7 +734,7 @@ static int send_sap(struct impl *impl, struct session *sess, bool bye) if (sdp->ptime > 0) spa_strbuf_append(&buf, - "a=ptime:%.6g\n", sdp->ptime); + "a=ptime:%s\n", spa_dtoa(ptime, sizeof(ptime), sdp->ptime)); if (sdp->framecount > 0) spa_strbuf_append(&buf,