Skip to content

Commit

Permalink
audiobrige: use fec only when received packet is expected plus one
Browse files Browse the repository at this point in the history
  • Loading branch information
atoppi committed Nov 20, 2023
1 parent 053497e commit 75d6369
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/janus_audiobridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -8247,7 +8247,7 @@ static void *janus_audiobridge_participant_thread(void *data) {
/* If this is Opus, check if there's a packet gap we should fix with FEC */
use_fec = FALSE;
if(!first && participant->codec == JANUS_AUDIOCODEC_OPUS && participant->fec) {
if(ntohs(rtp->seq_number) != participant->expected_seq) {
if(ntohs(rtp->seq_number) == participant->expected_seq + 1) {
/* Lost a packet here? Use FEC to recover */
use_fec = TRUE;
}
Expand Down

0 comments on commit 75d6369

Please sign in to comment.