Commit 386dccb9 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Fixed fmtp line for T140 RED payload

parent 6e7d8550
......@@ -297,7 +297,7 @@ bool_t is_payload_type_number_available(const MSList *l, int number, const Paylo
static void linphone_core_assign_payload_type_numbers(LinphoneCore *lc, MSList *codecs){
MSList *elem;
int dyn_number=lc->codecs_conf.dyn_pt;
int t140_payload_type_number = 0;
PayloadType *red = NULL, *t140 = NULL;
for (elem=codecs; elem!=NULL; elem=elem->next){
PayloadType *pt=(PayloadType*)elem->data;
......@@ -325,19 +325,19 @@ static void linphone_core_assign_payload_type_numbers(LinphoneCore *lc, MSList *
payload_type_set_enable(pt, FALSE);
}
}
if (strcmp(pt->mime_type, payload_type_t140_red.mime_type) == 0) {
if (number == -1) {
t140_payload_type_number = dyn_number;
} else {
t140_payload_type_number = number;
}
if (t140_payload_type_number > 0) {
const char *red_fmtp = ms_strdup_printf("%i/%i/%i", t140_payload_type_number, t140_payload_type_number, t140_payload_type_number);
payload_type_set_recv_fmtp(pt, red_fmtp);
}
red = pt;
} else if (strcmp(pt->mime_type, payload_type_t140.mime_type) == 0) {
t140 = pt;
}
}
if (t140 && red) {
int t140_payload_type_number = payload_type_get_number(t140);
const char *red_fmtp = ms_strdup_printf("%i/%i/%i", t140_payload_type_number, t140_payload_type_number, t140_payload_type_number);
payload_type_set_recv_fmtp(red, red_fmtp);
}
}
static bool_t has_telephone_event_at_rate(const MSList *tev, int rate){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment