Skip to content

Commit

Permalink
avcodec/mediacodec_wrapper: fix a potential local reference leak in f…
Browse files Browse the repository at this point in the history
…f_AMediaCodec_getCodecNameByType()
mbouron committed Jul 22, 2019
1 parent 9cb8875 commit 3f232d7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libavcodec/mediacodec_wrapper.c
Original file line number Diff line number Diff line change
@@ -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") ||

0 comments on commit 3f232d7

Please sign in to comment.