From ec52fbbcf3ccfcf43392743e071215ea26eb175d Mon Sep 17 00:00:00 2001 From: Alessandro Toppi Date: Mon, 20 Nov 2023 19:09:50 +0100 Subject: [PATCH] audiobrige: use fec only when received packet is expected plus one --- src/plugins/janus_audiobridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/janus_audiobridge.c b/src/plugins/janus_audiobridge.c index 1d84e6b2f5..5cee6d6042 100644 --- a/src/plugins/janus_audiobridge.c +++ b/src/plugins/janus_audiobridge.c @@ -8405,7 +8405,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; }