From b05de30b6d3851cd6be293ce45d4c790d45dca56 Mon Sep 17 00:00:00 2001 From: Maximilian Fridrich Date: Wed, 4 Dec 2024 08:23:11 +0100 Subject: [PATCH] rtp/sess.c: lock rtcp_sess in rtcp_set_srate_tx to fix data race (#1223) --- src/rtp/sess.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rtp/sess.c b/src/rtp/sess.c index 9dc769905..5b8a3b48f 100644 --- a/src/rtp/sess.c +++ b/src/rtp/sess.c @@ -321,7 +321,9 @@ void rtcp_set_srate_tx(struct rtp_sock *rs, uint32_t srate_tx) if (!sess) return; + mtx_lock(sess->lock); sess->srate_tx = srate_tx; + mtx_unlock(sess->lock); }