lavc/mediacodec: do not delete a local reference twice in case of error
authorMatthieu Bouron <matthieu.bouron@stupeflix.com>
Tue, 31 May 2016 09:37:11 +0000 (11:37 +0200)
committerMatthieu Bouron <matthieu.bouron@stupeflix.com>
Tue, 7 Jun 2016 08:18:11 +0000 (10:18 +0200)
libavcodec/mediacodec_wrapper.c

index 053c164..c847a11 100644 (file)
@@ -122,6 +122,7 @@ char *ff_AMediaCodecList_getCodecNameByType(const char *mime, int width, int hei
             goto done;
         }
         (*env)->DeleteLocalRef(env, tmp);
+        tmp = NULL;
 
         codec = (*env)->NewObject(env, jfields.mediacodec_list_class, jfields.init_id, 0);
         if (ff_jni_exception_check(env, 1, log_ctx) < 0) {