Skip to content

Commit

Permalink
rtp: lock rtcp_set_srate() (baresip#1043)
Browse files Browse the repository at this point in the history
  • Loading branch information
cspiel1 authored Jan 8, 2024
1 parent b57a240 commit 729e464
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/rtp/sess.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,10 @@ void rtcp_set_srate(struct rtp_sock *rs, uint32_t srate_tx, uint32_t srate_rx)
if (!sess)
return;

mtx_lock(sess->lock);
sess->srate_tx = srate_tx;
sess->srate_rx = srate_rx;
mtx_unlock(sess->lock);
}


Expand Down Expand Up @@ -339,7 +341,9 @@ void rtcp_set_srate_rx(struct rtp_sock *rs, uint32_t srate_rx)
if (!sess)
return;

mtx_lock(sess->lock);
sess->srate_rx = srate_rx;
mtx_unlock(sess->lock);
}


Expand Down

0 comments on commit 729e464

Please sign in to comment.