mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 19:18:06 +00:00
Fix crashes related to LinphoneVideoDefinition.
This commit is contained in:
parent
68b4de89f1
commit
d53a2f4f05
3 changed files with 10 additions and 7 deletions
|
|
@ -325,8 +325,6 @@ LinphoneCallParams * linphone_call_params_ref(LinphoneCallParams *cp) {
|
|||
}
|
||||
|
||||
void linphone_call_params_unref(LinphoneCallParams *cp) {
|
||||
if (cp->sent_vdef != NULL) linphone_video_definition_unref(cp->sent_vdef);
|
||||
if (cp->recv_vdef != NULL) linphone_video_definition_unref(cp->recv_vdef);
|
||||
belle_sip_object_unref(cp);
|
||||
}
|
||||
|
||||
|
|
@ -358,6 +356,8 @@ static void _linphone_call_params_uninit(LinphoneCallParams *cp){
|
|||
if (cp->custom_sdp_media_attributes[i]) sal_custom_sdp_attribute_free(cp->custom_sdp_media_attributes[i]);
|
||||
}
|
||||
if (cp->session_name) ms_free(cp->session_name);
|
||||
if (cp->sent_vdef != NULL) linphone_video_definition_unref(cp->sent_vdef);
|
||||
if (cp->recv_vdef != NULL) linphone_video_definition_unref(cp->recv_vdef);
|
||||
}
|
||||
|
||||
static void _linphone_call_params_clone(LinphoneCallParams *dst, const LinphoneCallParams *src) {
|
||||
|
|
@ -369,7 +369,9 @@ static void _linphone_call_params_clone(LinphoneCallParams *dst, const LinphoneC
|
|||
belle_sip_object_t tmp = dst->base;
|
||||
memcpy(dst, src, sizeof(LinphoneCallParams));
|
||||
dst->base = tmp;
|
||||
|
||||
|
||||
if (src->sent_vdef) dst->sent_vdef = linphone_video_definition_ref(src->sent_vdef);
|
||||
if (src->recv_vdef) dst->recv_vdef = linphone_video_definition_ref(src->recv_vdef);
|
||||
if (src->record_file) dst->record_file=ms_strdup(src->record_file);
|
||||
if (src->session_name) dst->session_name=ms_strdup(src->session_name);
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1964,13 +1964,13 @@ const LinphoneCallParams * linphone_call_get_current_params(LinphoneCall *call){
|
|||
#ifdef VIDEO_ENABLED
|
||||
VideoStream *vstream;
|
||||
#endif
|
||||
MS_VIDEO_SIZE_ASSIGN(call->current_params->sent_vsize, UNKNOWN);
|
||||
MS_VIDEO_SIZE_ASSIGN(call->current_params->recv_vsize, UNKNOWN);
|
||||
#ifdef VIDEO_ENABLED
|
||||
if (call->current_params->sent_vdef != NULL) linphone_video_definition_unref(call->current_params->sent_vdef);
|
||||
call->current_params->sent_vdef = NULL;
|
||||
if (call->current_params->recv_vdef != NULL) linphone_video_definition_unref(call->current_params->recv_vdef);
|
||||
call->current_params->recv_vdef = NULL;
|
||||
MS_VIDEO_SIZE_ASSIGN(call->current_params->sent_vsize, UNKNOWN);
|
||||
MS_VIDEO_SIZE_ASSIGN(call->current_params->recv_vsize, UNKNOWN);
|
||||
#ifdef VIDEO_ENABLED
|
||||
vstream = call->videostream;
|
||||
if (vstream != NULL) {
|
||||
call->current_params->sent_vsize = video_stream_get_sent_video_size(vstream);
|
||||
|
|
|
|||
|
|
@ -5846,7 +5846,8 @@ static void sound_config_uninit(LinphoneCore *lc)
|
|||
|
||||
static void video_config_uninit(LinphoneCore *lc)
|
||||
{
|
||||
lp_config_set_string(lc->config,"video","size",linphone_video_definition_get_name(linphone_core_get_preferred_video_definition(lc)));
|
||||
const LinphoneVideoDefinition *vdef = linphone_core_get_preferred_video_definition(lc);
|
||||
lp_config_set_string(lc->config,"video","size",vdef ? linphone_video_definition_get_name(vdef) : NULL);
|
||||
lp_config_set_int(lc->config,"video","display",lc->video_conf.display);
|
||||
lp_config_set_int(lc->config,"video","capture",lc->video_conf.capture);
|
||||
if (lc->video_conf.cams)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue