From bdaa5ae91ac1ba1e3844fceb5f611ba37ddde964 Mon Sep 17 00:00:00 2001
From: Jehan Monnier <jehan.monnier@linphone.org>
Date: Mon, 8 Oct 2012 18:19:33 +0200
Subject: [PATCH] save video capture/display while setted

---
 Makefile.am            | 2 --
 coreapi/linphonecore.c | 5 ++++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 8756019f49..4aa4332f2f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -232,6 +232,4 @@ clean-local:
 discovery:
 	touch specs.cpp
 	$(CC) --include $(top_builddir)/config.h \
-          --include $(top_builddir)/mediastreamer2/mediastreamer-config.h  \
-          --include $(top_builddir)/oRTP/ortp-config.h \
           $(TUNNEL_CFLAGS) $(CFLAGS) $(MEDIASTREAMER2_CFLAGS) $(ORTP_CFLAGS) -E -P -v -dD specs.cpp
diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c
index 7c11e83aeb..ada16d69bb 100644
--- a/coreapi/linphonecore.c
+++ b/coreapi/linphonecore.c
@@ -3840,7 +3840,10 @@ void linphone_core_enable_video(LinphoneCore *lc, bool_t vcap_enabled, bool_t di
 #endif
 	lc->video_conf.capture=vcap_enabled;
 	lc->video_conf.display=display_enabled;
-
+	if (linphone_core_ready(lc)){
+		lp_config_set_int(lc->config,"video","display",lc->video_conf.display);
+		lp_config_set_int(lc->config,"video","capture",lc->video_conf.capture);
+	}
 	/* need to re-apply network bandwidth settings*/
 	linphone_core_set_download_bandwidth(lc,
 		linphone_core_get_download_bandwidth(lc));
-- 
GitLab