@@ -3173,9 +3173,9 @@ static void janus_videoroom_create_dummy_publisher(janus_videoroom *room, GHashT
3173
3173
if(fmtp != NULL && strcmp(fmtp, "none")) {
3174
3174
/* Parse the fmtp string to see what we support (opus only) */
3175
3175
if(ps->acodec == JANUS_AUDIOCODEC_OPUS) {
3176
- if(strstr(fmtp, "useinbandfec=1"))
3176
+ if(strstr(fmtp, "useinbandfec=1") && room->do_opusfec )
3177
3177
ps->opusfec = TRUE;
3178
- if(strstr(fmtp, "usedtx=1"))
3178
+ if(strstr(fmtp, "usedtx=1") && room->do_opusdtx )
3179
3179
ps->opusdtx = TRUE;
3180
3180
if(strstr(fmtp, "stereo=1"))
3181
3181
ps->opusstereo = TRUE;
@@ -7897,8 +7897,8 @@ static json_t *janus_videoroom_process_synchronous_request(janus_videoroom_sessi
7897
7897
ps->disabled = TRUE;
7898
7898
} else {
7899
7899
ps->opusstereo = json_is_true(json_object_get(s, "stereo"));
7900
- ps->opusfec = json_is_true(json_object_get(s, "fec"));
7901
- ps->opusdtx = json_is_true(json_object_get(s, "dtx"));
7900
+ ps->opusfec = json_is_true(json_object_get(s, "fec")) && videoroom->do_opusfec ;
7901
+ ps->opusdtx = json_is_true(json_object_get(s, "dtx")) && videoroom->do_opusdtx ;
7902
7902
}
7903
7903
int audio_level_extmap_id = json_integer_value(json_object_get(s, "audiolevel_ext_id"));
7904
7904
if(audio_level_extmap_id > 0)
@@ -8242,8 +8242,8 @@ static json_t *janus_videoroom_process_synchronous_request(janus_videoroom_sessi
8242
8242
ps->disabled = TRUE;
8243
8243
} else {
8244
8244
ps->opusstereo = json_is_true(json_object_get(s, "stereo"));
8245
- ps->opusfec = json_is_true(json_object_get(s, "fec"));
8246
- ps->opusdtx = json_is_true(json_object_get(s, "dtx"));
8245
+ ps->opusfec = json_is_true(json_object_get(s, "fec")) && videoroom->do_opusfec ;
8246
+ ps->opusdtx = json_is_true(json_object_get(s, "dtx")) && videoroom->do_opusdtx ;
8247
8247
}
8248
8248
int audio_level_extmap_id = json_integer_value(json_object_get(s, "audiolevel_ext_id"));
8249
8249
if(audio_level_extmap_id > 0)
@@ -12799,9 +12799,9 @@ static void *janus_videoroom_handler(void *data) {
12799
12799
ps->playout_delay_extmap_id == 0 && strstr(a->value, JANUS_RTP_EXTMAP_PLAYOUT_DELAY)) {
12800
12800
ps->playout_delay_extmap_id = atoi(a->value);
12801
12801
} else if(videoroom->do_opusfec && m->type == JANUS_SDP_AUDIO && !strcasecmp(a->name, "fmtp")) {
12802
- if(strstr(a->value, "useinbandfec=1"))
12802
+ if(strstr(a->value, "useinbandfec=1") && videoroom->do_opusfec )
12803
12803
ps->opusfec = TRUE;
12804
- if(strstr(a->value, "usedtx=1"))
12804
+ if(strstr(a->value, "usedtx=1") && videoroom->do_opusdtx )
12805
12805
ps->opusdtx = TRUE;
12806
12806
if(strstr(a->value, "stereo=1"))
12807
12807
ps->opusstereo = TRUE;
0 commit comments