diff options
author | Matthieu Bouron <matthieu.bouron@gmail.com> | 2017-12-16 00:16:02 +0100 |
---|---|---|
committer | Matthieu Bouron <matthieu.bouron@gmail.com> | 2017-12-16 00:52:28 +0100 |
commit | 1f1207145a0f2d26e5e3525bea6cc417a3ec39cf (patch) | |
tree | 680ffc9f3a45c30c39dc1c043c59383eabd48e86 | |
parent | f3cffd121b990717996d8ddd646bd555c1db135b (diff) | |
download | ffmpeg-1f1207145a0f2d26e5e3525bea6cc417a3ec39cf.tar.gz |
lavc/mediacodec_wrapper: fix potential jni global reference leak
-rw-r--r-- | libavcodec/mediacodec_wrapper.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); } |