From faa892fb489b8dc360c25c94d70b8530ff6d6391 Mon Sep 17 00:00:00 2001 From: Daeseok Youn Date: Mon, 2 Apr 2018 21:43:53 +0900 Subject: [PATCH] nvbaseenc: fix build warnings with HAVE_NVENC_GST_GL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix following error: gstnvbaseenc.c: In function ‘gst_nv_base_enc_set_context’: gstnvbaseenc.c:451:17: error: unused variable ‘nvenc’ [-Werror=unused-variable] GstNvBaseEnc *nvenc = GST_NV_BASE_ENC (element); ^ https://bugzilla.gnome.org/show_bug.cgi?id=794896 --- sys/nvenc/gstnvbaseenc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/nvenc/gstnvbaseenc.c b/sys/nvenc/gstnvbaseenc.c index e805a5bcbb..60b8ec4140 100644 --- a/sys/nvenc/gstnvbaseenc.c +++ b/sys/nvenc/gstnvbaseenc.c @@ -448,9 +448,9 @@ gst_nv_base_enc_open (GstVideoEncoder * enc) static void gst_nv_base_enc_set_context (GstElement * element, GstContext * context) { +#if HAVE_NVENC_GST_GL GstNvBaseEnc *nvenc = GST_NV_BASE_ENC (element); -#if HAVE_NVENC_GST_GL gst_gl_handle_set_context (element, context, (GstGLDisplay **) & nvenc->display, (GstGLContext **) & nvenc->other_context); @@ -465,7 +465,9 @@ gst_nv_base_enc_set_context (GstElement * element, GstContext * context) static gboolean gst_nv_base_enc_sink_query (GstVideoEncoder * enc, GstQuery * query) { +#if HAVE_NVENC_GST_GL GstNvBaseEnc *nvenc = GST_NV_BASE_ENC (enc); +#endif switch (GST_QUERY_TYPE (query)) { #if HAVE_NVENC_GST_GL