mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Fix SalCallOp::set_local_media_description() with nullptr parameter.
This commit is contained in:
parent
56f8dcc57a
commit
25e51fc63a
1 changed files with 13 additions and 9 deletions
|
|
@ -36,17 +36,21 @@ SalCallOp::~SalCallOp() {
|
|||
}
|
||||
|
||||
int SalCallOp::set_local_media_description(SalMediaDescription *desc) {
|
||||
if (desc) sal_media_description_ref(desc);
|
||||
if (desc) {
|
||||
sal_media_description_ref(desc);
|
||||
belle_sip_error_code error;
|
||||
belle_sdp_session_description_t *sdp = media_description_to_sdp(desc);
|
||||
vector<char> buffer = marshal_media_description(sdp, error);
|
||||
if (error != BELLE_SIP_OK) return -1;
|
||||
|
||||
belle_sip_error_code error;
|
||||
belle_sdp_session_description_t *sdp = media_description_to_sdp(desc);
|
||||
vector<char> buffer = marshal_media_description(sdp, error);
|
||||
if (error != BELLE_SIP_OK) return -1;
|
||||
this->local_body.setContentType(ContentType::Sdp);
|
||||
this->local_body.setBody(move(buffer));
|
||||
} else {
|
||||
this->local_body = Content();
|
||||
}
|
||||
|
||||
this->local_body.setContentType(ContentType::Sdp);
|
||||
this->local_body.setBody(move(buffer));
|
||||
|
||||
if (this->local_media) sal_media_description_unref(this->local_media);
|
||||
if (this->local_media)
|
||||
sal_media_description_unref(this->local_media);
|
||||
this->local_media=desc;
|
||||
|
||||
if (this->remote_media){
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue