From: Aman Gupta <a...@tmm1.net> Signed-off-by: Aman Gupta <a...@tmm1.net> --- libavcodec/mediacodec_surface.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/mediacodec_surface.c b/libavcodec/mediacodec_surface.c index aada1ecebe..efcc4dc63c 100644 --- a/libavcodec/mediacodec_surface.c +++ b/libavcodec/mediacodec_surface.c @@ -28,9 +28,11 @@ void *ff_mediacodec_surface_ref(void *surface, void *log_ctx) { JNIEnv *env = NULL; - void *reference = NULL; + if (!surface) + return NULL; + env = ff_jni_get_env(log_ctx); if (!env) { return NULL; -- 2.20.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".