Commit 05644c1e authored by Thomas Guillem's avatar Thomas Guillem Committed by Jean-Baptiste Kempf

mediacodec: fix jni leak

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 4e32abb1
......@@ -399,6 +399,7 @@ static int OpenDecoder(vlc_object_t *p_this)
if ((*env)->ExceptionOccurred(env)) {
msg_Warn(p_dec, "Exception occurred in MediaCodecInfo.getCapabilitiesForType");
(*env)->ExceptionClear(env);
(*env)->DeleteLocalRef(env, info);
break;
} else if (codec_capabilities) {
profile_levels = (*env)->GetObjectField(env, codec_capabilities, p_sys->profile_levels_field);
......@@ -444,6 +445,7 @@ static int OpenDecoder(vlc_object_t *p_this)
p_sys->name[name_len] = '\0';
(*env)->ReleaseStringUTFChars(env, name, name_ptr);
codec_name = name;
(*env)->DeleteLocalRef(env, info);
break;
}
(*env)->DeleteLocalRef(env, info);
......
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