aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthieu Bouron <matthieu.bouron@gmail.com>2019-04-25 17:12:32 +0200
committerMatthieu Bouron <matthieu.bouron@gmail.com>2019-07-26 18:28:29 +0200
commit3abec7f39735a1cda83c002937abe107bb47caa9 (patch)
tree25f86b1ba9899a888686b02ddc379ba171335028
parenta3d986ff47b15dcfdda3060d1b9ea3ae81a3d7ad (diff)
downloadffmpeg-3abec7f39735a1cda83c002937abe107bb47caa9.tar.gz
avcodec/mediacodec_wrapper: fix a potential local reference leak in ff_AMediaCodec_getCodecNameByType()
(cherry picked from commit 3f232d713db3cb665c265387c7009904c2e85e58)
-rw-r--r--libavcodec/mediacodec_wrapper.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c
index e2df07cb41..70e1e7cae1 100644
--- a/libavcodec/mediacodec_wrapper.c
+++ b/libavcodec/mediacodec_wrapper.c
@@ -469,6 +469,11 @@ char *ff_AMediaCodecList_getCodecNameByType(const char *mime, int profile, int e
goto done;
}
+ if (codec_name) {
+ (*env)->DeleteLocalRef(env, codec_name);
+ codec_name = NULL;
+ }
+
/* Skip software decoders */
if (
strstr(name, "OMX.google") ||