From 22e88c8da1ceb8deffdee888ea54d3ae889d3ebf Mon Sep 17 00:00:00 2001
From: Ghislain MARY <ghislain.mary@belledonne-communications.com>
Date: Tue, 18 Mar 2014 11:51:19 +0100
Subject: [PATCH] Copy RTCP XR configuration in each streams when creating the
 local media description.

---
 coreapi/linphonecall.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c
index c3864f90ec..8568910f7c 100644
--- a/coreapi/linphonecall.c
+++ b/coreapi/linphonecall.c
@@ -260,6 +260,7 @@ static void setup_encryption_keys(LinphoneCall *call, SalMediaDescription *md){
 
 static void setup_rtcp_xr(LinphoneCall *call, SalMediaDescription *md) {
 	LinphoneCore *lc = call->core;
+	int i;
 
 	md->rtcp_xr.enabled = lp_config_get_int(lc->config, "rtp", "rtcp_xr_enabled", 0);
 	if (md->rtcp_xr.enabled == TRUE) {
@@ -276,6 +277,9 @@ static void setup_rtcp_xr(LinphoneCall *call, SalMediaDescription *md) {
 		}
 		md->rtcp_xr.voip_metrics_enabled = lp_config_get_int(lc->config, "rtp", "rtcp_xr_voip_metrics_enabled", 0);
 	}
+	for (i = 0; i < md->n_active_streams; i++) {
+		memcpy(&md->streams[i].rtcp_xr, &md->rtcp_xr, sizeof(md->streams[i].rtcp_xr));
+	}
 }
 
 void linphone_call_make_local_media_description(LinphoneCore *lc, LinphoneCall *call){
-- 
GitLab