Skip to content

Commit

Permalink
Cleanup also when changing room
Browse files Browse the repository at this point in the history
  • Loading branch information
atoppi committed Jul 11, 2024
1 parent 6d94cc9 commit 0c9cb96
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/plugins/janus_audiobridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -7633,6 +7633,10 @@ static void *janus_audiobridge_handler(void *data) {
participant->display = display_text ? g_strdup(display_text) : NULL;
participant->room = audiobridge;
participant->muted = muted ? json_is_true(muted) : FALSE; /* When switching to a new room, you're unmuted by default */
janus_mutex_lock(&participant->qmutex);
janus_audiobridge_participant_clear_jitter_buffer(participant);
janus_audiobridge_participant_clear_inbuf(participant);
janus_mutex_unlock(&participant->qmutex);
if(suspended && json_is_true(suspended)) {
janus_mutex_lock(&participant->suspend_cond_mutex);
g_atomic_int_set(&participant->suspended, 1);
Expand Down

0 comments on commit 0c9cb96

Please sign in to comment.