Commit e49c91ef 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>
(cherry picked from commit 05644c1e54548cc4ac0b57b70000d2e5fe7d5c16)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 47d9673f
......@@ -392,6 +392,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);
......@@ -437,6 +438,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