nvcodec: Fix compiler error if OpenGL is not enabled

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1633>
This commit is contained in:
Julian Bouzas 2020-09-24 11:25:33 -04:00 committed by GStreamer Merge Bot
parent 36030158c4
commit 8cf1b7a154

View 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: