Commit 1f120714 authored by Matthieu Bouron's avatar Matthieu Bouron

lavc/mediacodec_wrapper: fix potential jni global reference leak

parent f3cffd12
...@@ -1206,6 +1206,9 @@ fail: ...@@ -1206,6 +1206,9 @@ fail:
} }
if (ret < 0) { if (ret < 0) {
if (codec->object) {
(*env)->DeleteGlobalRef(env, codec->object);
}
ff_jni_reset_jfields(env, &codec->jfields, jni_amediacodec_mapping, 1, codec); ff_jni_reset_jfields(env, &codec->jfields, jni_amediacodec_mapping, 1, codec);
av_freep(&codec); av_freep(&codec);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment