[FFmpeg-cvslog] lavc/mediacodec_wrapper: fix potential jni global reference leak
Matthieu Bouron
git at videolan.org
Sat Dec 16 02:03:17 EET 2017
ffmpeg | branch: master | Matthieu Bouron <matthieu.bouron at gmail.com> | Sat Dec 16 00:16:02 2017 +0100| [1f1207145a0f2d26e5e3525bea6cc417a3ec39cf] | committer: Matthieu Bouron
lavc/mediacodec_wrapper: fix potential jni global reference leak
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1f1207145a0f2d26e5e3525bea6cc417a3ec39cf
---
libavcodec/mediacodec_wrapper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c
index 329a5eb896..d9f0e27a7d 100644
--- a/libavcodec/mediacodec_wrapper.c
+++ b/libavcodec/mediacodec_wrapper.c
@@ -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);
}
More information about the ffmpeg-cvslog
mailing list