fix memory leak and avoid 3 internal deprecated warnings

This commit is contained in:
Simon Morlat 2017-04-15 23:32:56 +02:00
parent 74b638fc79
commit d1c3da96f2
2 changed files with 4 additions and 4 deletions

View file

@ -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;
}

View file

@ -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;
}