1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

lavc/mediacodec_wrapper: fix potential jni global reference leak

This commit is contained in:
Matthieu Bouron 2017-12-16 00:16:02 +01:00
parent f3cffd121b
commit 1f1207145a

View File

@ -1206,6 +1206,9 @@ fail:
}
if (ret < 0) {
if (codec->object) {
(*env)->DeleteGlobalRef(env, codec->object);
}
ff_jni_reset_jfields(env, &codec->jfields, jni_amediacodec_mapping, 1, codec);
av_freep(&codec);
}