diff --git a/coreapi/bellesip_sal/sal_op_call.c b/coreapi/bellesip_sal/sal_op_call.c index 2b8d67f18..076421aad 100644 --- a/coreapi/bellesip_sal/sal_op_call.c +++ b/coreapi/bellesip_sal/sal_op_call.c @@ -89,7 +89,7 @@ static void sdp_process(SalOp *h){ strcpy(h->result->streams[i].rtcp_addr,h->base.remote_media->streams[i].rtcp_addr); h->result->streams[i].rtcp_port=h->base.remote_media->streams[i].rtcp_port; - if ((h->result->streams[i].proto == SalProtoRtpSavpf) || (h->result->streams[i].proto == SalProtoRtpSavp)) { + if (sal_stream_description_has_srtp(&h->result->streams[i])) { h->result->streams[i].crypto[0] = h->base.remote_media->streams[i].crypto[0]; } } diff --git a/coreapi/bellesip_sal/sal_sdp.c b/coreapi/bellesip_sal/sal_sdp.c index 95fdd9ab6..f473b5956 100644 --- a/coreapi/bellesip_sal/sal_sdp.c +++ b/coreapi/bellesip_sal/sal_sdp.c @@ -250,7 +250,7 @@ static void stream_description_to_sdp ( belle_sdp_session_description_t *session if ( stream->bandwidth>0 ) belle_sdp_media_description_set_bandwidth ( media_desc,"AS",stream->bandwidth ); - if ((stream->proto == SalProtoRtpSavpf) || (stream->proto == SalProtoRtpSavp)) { + if (sal_stream_description_has_srtp(stream)) { /* add crypto lines */ for ( j=0; jproto == SalProtoRtpSavpf) || (stream->proto == SalProtoRtpSavp)) { + if (sal_stream_description_has_srtp(stream)) { sdp_parse_media_crypto_parameters(media_desc, stream); } @@ -826,7 +826,7 @@ static SalStreamDescription * sdp_to_stream_description(SalMediaDescription *md, sdp_parse_media_ice_parameters(media_desc, stream); /* Get RTCP-FB attributes if any */ - if ((stream->proto == SalProtoRtpAvpf) || (stream->proto == SalProtoRtpSavpf)) { + if (sal_stream_description_has_avpf(stream)) { enable_avpf_for_stream(stream); sdp_parse_rtcp_fb_parameters(media_desc, stream); }