]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ffjni.h
avcodec/sunrast: Fix input buffer pointer check
[ffmpeg] / libavcodec / ffjni.h
index 990c7b9c3f43750c3e5dcf0ef18a0c01eab814c5..6027bac0ab12dcd2af1e85f842d968a6f6100a08 100644 (file)
 #include <jni.h>
 
 /*
- * 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
  * @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.