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
84a59d62
Commit
84a59d62
authored
Sep 18, 2015
by
Sylvain Berfini
🐮
Browse files
Fixed nb_stream variable in resultdesc and fixed test to detect change between two media descs
parent
cae3cd4f
Changes
2
Hide whitespace changes
Inline
Side-by-side
coreapi/offeranswer.c
View file @
84a59d62
...
...
@@ -564,6 +564,7 @@ int offer_answer_initiate_incoming(const SalMediaDescription *local_capabilities
SalMediaDescription
*
result
,
bool_t
one_matching_codec
){
int
i
;
const
SalStreamDescription
*
ls
=
NULL
,
*
rs
;
result
->
nb_streams
=
0
;
for
(
i
=
0
;
i
<
SAL_MEDIA_DESCRIPTION_MAX_STREAMS
;
++
i
){
rs
=&
remote_offer
->
streams
[
i
];
...
...
@@ -588,6 +589,7 @@ int offer_answer_initiate_incoming(const SalMediaDescription *local_capabilities
result
->
streams
[
i
].
rtcp_xr
.
enabled
=
TRUE
;
}
}
result
->
nb_streams
++
;
}
else
{
ms_message
(
"Declining mline %i, no corresponding stream in local capabilities description."
,
i
);
/* create an inactive stream for the answer, as there where no matching stream in local capabilities */
...
...
@@ -603,7 +605,7 @@ int offer_answer_initiate_incoming(const SalMediaDescription *local_capabilities
}
}
}
result
->
nb_streams
=
i
;
strcpy
(
result
->
username
,
local_capabilities
->
username
);
strcpy
(
result
->
addr
,
local_capabilities
->
addr
);
result
->
bandwidth
=
local_capabilities
->
bandwidth
;
...
...
coreapi/sal.c
View file @
84a59d62
...
...
@@ -342,7 +342,7 @@ int sal_media_description_equals(const SalMediaDescription *md1, const SalMediaD
if
(
md1
->
nb_streams
!=
md2
->
nb_streams
)
result
|=
SAL_MEDIA_DESCRIPTION_STREAMS_CHANGED
;
if
(
md1
->
bandwidth
!=
md2
->
bandwidth
)
result
|=
SAL_MEDIA_DESCRIPTION_CODEC_CHANGED
;
for
(
i
=
0
;
i
<
SAL_MEDIA_DESCRIPTION_MAX_STREAMS
;
++
i
){
if
(
!
sal_stream_description_active
(
&
md1
->
streams
[
i
])
||
!
sal_stream_description_active
(
&
md2
->
streams
[
i
]))
continue
;
if
(
!
sal_stream_description_active
(
&
md1
->
streams
[
i
])
&&
!
sal_stream_description_active
(
&
md2
->
streams
[
i
]))
continue
;
result
|=
sal_stream_description_equals
(
&
md1
->
streams
[
i
],
&
md2
->
streams
[
i
]);
}
return
result
;
...
...
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