Browse Source

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

(cherry picked from commit 3f232d713d)
tags/n4.2
Matthieu Bouron 6 years ago
parent
commit
3abec7f397
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavcodec/mediacodec_wrapper.c

+ 5
- 0
libavcodec/mediacodec_wrapper.c View File

@@ -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") ||


Loading…
Cancel
Save