Skip to content
This repository has been archived by the owner on Oct 7, 2021. It is now read-only.

Commit

Permalink
do not detach main thread on error cases, fixes #446
Browse files Browse the repository at this point in the history
  • Loading branch information
tanersener committed Jun 12, 2020
1 parent ce10a88 commit 9a2e0a7
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions android/app/src/main/cpp/mobileffmpeg.c
Expand Up @@ -582,21 +582,18 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved) {
logMethod = (*env)->GetStaticMethodID(env, localConfigClass, "log", "(I[B)V");
if (logMethod == NULL) {
LOGE("OnLoad thread failed to GetStaticMethodID for %s.\n", "log");
(*globalVm)->DetachCurrentThread(globalVm);
return JNI_FALSE;
}

statisticsMethod = (*env)->GetStaticMethodID(env, localConfigClass, "statistics", "(IFFJIDD)V");
if (logMethod == NULL) {
LOGE("OnLoad thread failed to GetStaticMethodID for %s.\n", "statistics");
(*globalVm)->DetachCurrentThread(globalVm);
return JNI_FALSE;
}

stringConstructor = (*env)->GetMethodID(env, localStringClass, "<init>", "([BLjava/lang/String;)V");
if (stringConstructor == NULL) {
LOGE("OnLoad thread failed to GetMethodID for %s.\n", "<init>");
(*globalVm)->DetachCurrentThread(globalVm);
return JNI_FALSE;
}

Expand Down

0 comments on commit 9a2e0a7

Please sign in to comment.