| Index: webrtc/api/java/android/org/webrtc/EglBase14.java
|
| diff --git a/webrtc/api/java/android/org/webrtc/EglBase14.java b/webrtc/api/java/android/org/webrtc/EglBase14.java
|
| index 6b406228ce071e20693a1908d9344ebbda45fdb5..71d6d99873616c2dccd36a4f29170caa1641ac32 100644
|
| --- a/webrtc/api/java/android/org/webrtc/EglBase14.java
|
| +++ b/webrtc/api/java/android/org/webrtc/EglBase14.java
|
| @@ -246,8 +246,10 @@ public final class EglBase14 extends EglBase {
|
| int[] contextAttributes = {EGL14.EGL_CONTEXT_CLIENT_VERSION, 2, EGL14.EGL_NONE};
|
| EGLContext rootContext =
|
| sharedContext == null ? EGL14.EGL_NO_CONTEXT : sharedContext.egl14Context;
|
| - EGLContext eglContext =
|
| - EGL14.eglCreateContext(eglDisplay, eglConfig, rootContext, contextAttributes, 0);
|
| + final EGLContext eglContext;
|
| + synchronized (EglBase.lock) {
|
| + eglContext = EGL14.eglCreateContext(eglDisplay, eglConfig, rootContext, contextAttributes, 0);
|
| + }
|
| if (eglContext == EGL14.EGL_NO_CONTEXT) {
|
| throw new RuntimeException("Failed to create EGL context");
|
| }
|
|
|