rtp-sdp: format ptime in the C locale

Don't place locale dependent strings in the SDP.

Fixes #4615
This commit is contained in:
Wim Taymans 2025-03-17 11:02:35 +01:00
parent 4847e3ad6e
commit 0e7f39a3d3

View file

@ -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,