Bug 873812 - Don't attempt to open camera objects/probe capabilities more than once. r=jesup

This commit is contained in:
Gian-Carlo Pascutto 2013-05-21 09:38:34 +02:00
parent 83235b061d
commit 00901a6a48

View File

@ -71,6 +71,13 @@ WebRtc_Word32 VideoCaptureAndroid::SetAndroidObjects(void* javaVM,
g_jvm = static_cast<JavaVM*> (javaVM);
if (javaVM) {
// Already done? Exit early.
if (g_javaCmClass != NULL
&& g_javaCmDevInfoClass != NULL
&& g_javaCmDevInfoObject != NULL) {
return 0;
}
JNIEnv* env = NULL;
if (g_jvm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) {
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, -1,