From 4f85b8a5d6eb943c70a161fe91bae0fc67d5daa5 Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Tue, 24 Apr 2018 09:20:27 +0200 Subject: [PATCH] changer usage of MediastreamerAndroidContext.setContext --- java/impl/org/linphone/core/LinphoneCoreFactoryImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/java/impl/org/linphone/core/LinphoneCoreFactoryImpl.java b/java/impl/org/linphone/core/LinphoneCoreFactoryImpl.java index ba951efb4..402049f5a 100644 --- a/java/impl/org/linphone/core/LinphoneCoreFactoryImpl.java +++ b/java/impl/org/linphone/core/LinphoneCoreFactoryImpl.java @@ -104,10 +104,11 @@ public class LinphoneCoreFactoryImpl extends LinphoneCoreFactory { fcontext = (Context)context; boolean openh264DownloadEnabled = false; if (context != null) openh264DownloadEnabled = loadingDownloadedOpenH264(fcontext); - MediastreamerAndroidContext.setContext(context); + File user = userConfig == null ? null : new File(userConfig); File factory = factoryConfig == null ? null : new File(factoryConfig); LinphoneCore lc = new LinphoneCoreImpl(listener, user, factory, userdata, context); + MediastreamerAndroidContext.setContext(context,lc.getMSFactory()); lc.enableDownloadOpenH264(openh264DownloadEnabled); return lc; } catch (IOException e) { @@ -121,8 +122,9 @@ public class LinphoneCoreFactoryImpl extends LinphoneCoreFactory { fcontext = (Context)context; boolean openh264DownloadEnabled = false; if (context != null) openh264DownloadEnabled = loadingDownloadedOpenH264(fcontext); - MediastreamerAndroidContext.setContext(context); + LinphoneCore lc = new LinphoneCoreImpl(listener, context); + MediastreamerAndroidContext.setContext(context,lc.getMSFactory()); lc.enableDownloadOpenH264(openh264DownloadEnabled); return lc; } catch (IOException e) {