Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
d53a2f4f
Commit
d53a2f4f
authored
Apr 19, 2017
by
Ghislain MARY
Browse files
Fix crashes related to LinphoneVideoDefinition.
parent
68b4de89
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
+10
-7
coreapi/call_params.c
coreapi/call_params.c
+5
-3
coreapi/linphonecall.c
coreapi/linphonecall.c
+3
-3
coreapi/linphonecore.c
coreapi/linphonecore.c
+2
-1
No files found.
coreapi/call_params.c
View file @
d53a2f4f
...
...
@@ -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
);
/*
...
...
coreapi/linphonecall.c
View file @
d53a2f4f
...
...
@@ -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
);
...
...
coreapi/linphonecore.c
View file @
d53a2f4f
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment