From 35b0e75b545dbf81a8372413dcb0002b826eb94f Mon Sep 17 00:00:00 2001 From: Aman Gupta Date: Mon, 9 Sep 2019 13:20:41 -0700 Subject: [PATCH] avcodec/mediacodec_surface: drop unnecessary local variable Signed-off-by: Aman Gupta --- libavcodec/mediacodec_surface.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libavcodec/mediacodec_surface.c b/libavcodec/mediacodec_surface.c index aada1ecebe..26724d3574 100644 --- a/libavcodec/mediacodec_surface.c +++ b/libavcodec/mediacodec_surface.c @@ -29,16 +29,12 @@ void *ff_mediacodec_surface_ref(void *surface, void *log_ctx) { JNIEnv *env = NULL; - void *reference = NULL; - env = ff_jni_get_env(log_ctx); if (!env) { return NULL; } - reference = (*env)->NewGlobalRef(env, surface); - - return reference; + return (*env)->NewGlobalRef(env, surface); } int ff_mediacodec_surface_unref(void *surface, void *log_ctx)