From 63bc42a55512c87eb08590daa15be5995e92b0b4 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 9 May 2016 20:47:28 +0200 Subject: [PATCH] fix AVPF management in offer-answer. Initiate an implicit avpf offer while implicit avpf is locally disabled should result in avpf disabled locally for these payloads. --- coreapi/bellesip_sal/sal_sdp.c | 10 +++++----- coreapi/offeranswer.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/coreapi/bellesip_sal/sal_sdp.c b/coreapi/bellesip_sal/sal_sdp.c index 2398fde30..177c813ab 100644 --- a/coreapi/bellesip_sal/sal_sdp.c +++ b/coreapi/bellesip_sal/sal_sdp.c @@ -642,7 +642,7 @@ static bool_t sdp_parse_rtcp_fb_parameters(belle_sdp_media_description_t *media_ MSList *pt_it; PayloadType *pt; int8_t pt_num; - bool_t retval = FALSE; + bool_t retval = FALSE; /* Handle rtcp-fb attributes that concern all payload types. */ for (it = belle_sdp_media_description_get_attributes(media_desc); it != NULL; it = it->next) { @@ -653,7 +653,7 @@ static bool_t sdp_parse_rtcp_fb_parameters(belle_sdp_media_description_t *media_ for (pt_it = stream->payloads; pt_it != NULL; pt_it = pt_it->next) { pt = (PayloadType *)pt_it->data; apply_rtcp_fb_attribute_to_payload(fb_attribute, stream, pt); - retval = TRUE; + retval = TRUE; } } } @@ -667,14 +667,14 @@ static bool_t sdp_parse_rtcp_fb_parameters(belle_sdp_media_description_t *media_ pt_num = belle_sdp_rtcp_fb_attribute_get_id(fb_attribute); for (pt_it = stream->payloads; pt_it != NULL; pt_it = pt_it->next) { pt = (PayloadType *)pt_it->data; - retval = TRUE; + retval = TRUE; if (payload_type_get_number(pt) == (int)pt_num) { apply_rtcp_fb_attribute_to_payload(fb_attribute, stream, pt); } } } } - return retval; + return retval; } static void sal_init_rtcp_xr_description(OrtpRtcpXrConfiguration *config) { @@ -851,7 +851,7 @@ static SalStreamDescription * sdp_to_stream_description(SalMediaDescription *md, sdp_parse_media_ice_parameters(media_desc, stream); has_avpf_attributes = sdp_parse_rtcp_fb_parameters(media_desc, stream); - + /* Get RTCP-FB attributes if any */ if (sal_stream_description_has_avpf(stream)) { enable_avpf_for_stream(stream); diff --git a/coreapi/offeranswer.c b/coreapi/offeranswer.c index c15c26f43..c8926d8aa 100644 --- a/coreapi/offeranswer.c +++ b/coreapi/offeranswer.c @@ -199,7 +199,7 @@ static MSList *match_payloads(MSFactory *factory, const MSList *local, const MSL payload_type_append_send_fmtp(matched,p2->send_fmtp); } payload_type_set_flag(matched, PAYLOAD_TYPE_FLAG_CAN_RECV|PAYLOAD_TYPE_FLAG_CAN_SEND); - if (p2->flags & PAYLOAD_TYPE_RTCP_FEEDBACK_ENABLED) { + if (matched->flags & PAYLOAD_TYPE_RTCP_FEEDBACK_ENABLED && p2->flags & PAYLOAD_TYPE_RTCP_FEEDBACK_ENABLED) { payload_type_set_flag(matched, PAYLOAD_TYPE_RTCP_FEEDBACK_ENABLED); /* Negotiation of AVPF features (keep common features) */ matched->avpf.features &= p2->avpf.features;