Commit d1c3da96 authored by Simon Morlat's avatar Simon Morlat

fix memory leak and avoid 3 internal deprecated warnings

parent 74b638fc
......@@ -5211,7 +5211,7 @@ LinphoneStatus linphone_call_decline(LinphoneCall * call, LinphoneReason reason)
LinphoneErrorInfo *ei = linphone_error_info_new();
linphone_error_info_set(ei, "SIP", reason,linphone_reason_to_error_code(reason), NULL, NULL);
status = linphone_call_decline_with_error_info(call, ei);
linphone_error_info_unref(ei);
return status;
}
......
......@@ -6061,15 +6061,15 @@ bool_t linphone_core_get_ring_during_incoming_early_media(const LinphoneCore *lc
}
static OrtpPayloadType* _linphone_core_find_payload_type(LinphoneCore* lc, const char* type, int rate, int channels) {
OrtpPayloadType* result = find_payload_type_from_list(type, rate, channels, linphone_core_get_audio_codecs(lc));
OrtpPayloadType* result = find_payload_type_from_list(type, rate, channels, lc->codecs_conf.audio_codecs);
if (result) {
return result;
} else {
result = find_payload_type_from_list(type, rate, 0, linphone_core_get_video_codecs(lc));
result = find_payload_type_from_list(type, rate, 0, lc->codecs_conf.video_codecs);
if (result) {
return result;
} else {
result = find_payload_type_from_list(type, rate, 0, linphone_core_get_text_codecs(lc));
result = find_payload_type_from_list(type, rate, 0, lc->codecs_conf.text_codecs);
if (result) {
return result;
}
......
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