X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fffjni.h;h=6027bac0ab12dcd2af1e85f842d968a6f6100a08;hb=c03b9d6a62db4e45119e1170e83f26df1fba36df;hp=990c7b9c3f43750c3e5dcf0ef18a0c01eab814c5;hpb=3b95452ca8bb39ac2136c9212a80b921e37f18c8;p=ffmpeg diff --git a/libavcodec/ffjni.h b/libavcodec/ffjni.h index 990c7b9c3f4..6027bac0ab1 100644 --- a/libavcodec/ffjni.h +++ b/libavcodec/ffjni.h @@ -26,7 +26,10 @@ #include /* - * Attach a JNI environment to the current thread. + * Attach permanently a JNI environment to the current thread and retrieve it. + * + * If successfully attached, the JNI environment will automatically be detached + * at thread destruction. * * @param attached pointer to an integer that will be set to 1 if the * environment has been attached to the current thread or 0 if it is @@ -34,15 +37,7 @@ * @param log_ctx context used for logging, can be NULL * @return the JNI environment on success, NULL otherwise */ -JNIEnv *ff_jni_attach_env(int *attached, void *log_ctx); - -/* - * Detach the JNI environment from the current thread. - * - * @param log_ctx context used for logging, can be NULL - * @return 0 on success, < 0 otherwise - */ -int ff_jni_detach_env(void *log_ctx); +JNIEnv *ff_jni_get_env(void *log_ctx); /* * Convert a jstring to its utf characters equivalent.