avcodec/mediacodec_wrapper: fix a local reference leak in ff_AMediaCodec_getName()

(cherry picked from commit 9cb8875c16)
This commit is contained in:
Matthieu Bouron
2019-04-25 17:40:55 +02:00
parent 65434823a1
commit a3d986ff47

View File

@@ -1337,6 +1337,10 @@ char *ff_AMediaCodec_getName(FFAMediaCodec *codec)
ret = ff_jni_jstring_to_utf_chars(env, name, codec);
fail:
if (name) {
(*env)->DeleteLocalRef(env, name);
}
return ret;
}