OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d0b8b1
)
lavc/ffjni: fix local reference leak
author
Matthieu Bouron
<matthieu.bouron@gmail.com>
Wed, 10 May 2017 13:57:57 +0000
(15:57 +0200)
committer
Matthieu Bouron
<matthieu.bouron@gmail.com>
Thu, 11 May 2017 14:28:59 +0000
(16:28 +0200)
Reviewed-by: Clément Bœsch <u@pkh.me>
libavcodec/ffjni.c
patch
|
blob
|
history
diff --git
a/libavcodec/ffjni.c
b/libavcodec/ffjni.c
index
3f4c380
..
b2bcae9
100644
(file)
--- a/
libavcodec/ffjni.c
+++ b/
libavcodec/ffjni.c
@@
-303,6
+303,11
@@
int ff_jni_init_jfields(JNIEnv *env, void *jfields, const struct FFJniField *jfi
last_clazz = *(jclass*)((uint8_t*)jfields + jfields_mapping[i].offset) =
global ? (*env)->NewGlobalRef(env, clazz) : clazz;
+
+ if (global) {
+ (*env)->DeleteLocalRef(env, clazz);
+ }
+
} else {
if (!last_clazz) {