Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit 801377f

Browse files
committed
register active JVM with av_jni_set_java_vm(), fix #83
1 parent 143347c commit 801377f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

android/app/src/main/cpp/mobileffmpeg.c

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
/*
2121
* CHANGES 02.2019
2222
* --------------------------------------------------------
23+
* - JavaVM registered via av_jni_set_java_vm()
2324
* - registerNewNativeFFmpegPipe() method added
2425
*
2526
* CHANGES 10.2018
@@ -40,6 +41,7 @@
4041
#include <sys/stat.h>
4142

4243
#include "config.h"
44+
#include "libavcodec/jni.h"
4345
#include "libavutil/bprint.h"
4446
#include "mobileffmpeg.h"
4547
#include "fftools_ffmpeg.h"
@@ -509,6 +511,8 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved) {
509511
return JNI_FALSE;
510512
}
511513

514+
av_jni_set_java_vm(vm, NULL);
515+
512516
configClass = (jclass) ((*env)->NewGlobalRef(env, localConfigClass));
513517

514518
redirectionEnabled = 0;

0 commit comments

Comments
 (0)