Commit 3abec7f3 authored by Matthieu Bouron's avatar Matthieu Bouron

avcodec/mediacodec_wrapper: fix a potential local reference leak in…

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

(cherry picked from commit 3f232d71)
parent a3d986ff
...@@ -469,6 +469,11 @@ char *ff_AMediaCodecList_getCodecNameByType(const char *mime, int profile, int e ...@@ -469,6 +469,11 @@ char *ff_AMediaCodecList_getCodecNameByType(const char *mime, int profile, int e
goto done; goto done;
} }
if (codec_name) {
(*env)->DeleteLocalRef(env, codec_name);
codec_name = NULL;
}
/* Skip software decoders */ /* Skip software decoders */
if ( if (
strstr(name, "OMX.google") || strstr(name, "OMX.google") ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment