nvcodec: Fix compiler error if OpenGL is not enabled
authorJulian Bouzas <julian.bouzas@collabora.com>
Thu, 24 Sep 2020 15:25:33 +0000 (11:25 -0400)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 16 Oct 2020 15:56:49 +0000 (15:56 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1633>

sys/nvcodec/gstnvdec.c

index 039ee13..6efa3fa 100644 (file)
@@ -548,12 +548,14 @@ gst_nvdec_negotiate (GstVideoDecoder * decoder)
     gst_clear_caps (&caps);
   }
 
+#ifdef HAVE_NVCODEC_GST_GL
   if (nvdec->mem_type == GST_NVDEC_MEM_TYPE_GL &&
       !gst_nvdec_ensure_gl_context (nvdec)) {
     GST_WARNING_OBJECT (nvdec,
         "OpenGL context is not CUDA-compatible, fallback to system memory");
     nvdec->mem_type = GST_NVDEC_MEM_TYPE_SYSTEM;
   }
+#endif
 
   switch (nvdec->mem_type) {
     case GST_NVDEC_MEM_TYPE_CUDA: