mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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:
parent
36030158c4
commit
8cf1b7a154
1 changed files with 2 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue