Skip to content

Commit

Permalink
MT#55283 fix potential deadlock
Browse files Browse the repository at this point in the history
Fix a regression from 4291c85

send_timer_rtcp() does its own locking of the SSRC. Release the lock
before calling it.

Change-Id: I185fb2fb4b47a343ab4be00d16629b5f330ee965
  • Loading branch information
rfuchs committed Feb 16, 2024
1 parent 840c2a8 commit 99021ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions daemon/media_player.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,10 @@ static void __send_timer_send_common(struct send_timer *st, struct codec_packet
struct ssrc_ctx *ssrc_out = cp->ssrc_out;
if (ssrc_out && ssrc_out->next_rtcp.tv_sec) {
mutex_lock(&ssrc_out->parent->h.lock);
if (timeval_diff(&ssrc_out->next_rtcp, &rtpe_now) < 0)
send_timer_rtcp(st, ssrc_out);
long long diff = timeval_diff(&ssrc_out->next_rtcp, &rtpe_now);
mutex_unlock(&ssrc_out->parent->h.lock);
if (diff < 0)
send_timer_rtcp(st, ssrc_out);
}

out:
Expand Down

0 comments on commit 99021ca

Please sign in to comment.