summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorHaihao Xiang <haihao.xiang@intel.com>2020-04-26 13:30:16 +0800
committerHaihao Xiang <haihao.xiang@intel.com>2020-04-26 14:55:30 +0800
commit336c2b76d1748b6ecab2922d4f387314529881a1 (patch)
treed5959fae870a313298776430277f6c9f1d23e386 /gst
parent8b7a5a36f1b2769dd6c8cbddb375b8dadf2b9057 (diff)
vaapipluginutil: Use GST_VAAPI_DISPLAY_TYPE_DRM for Mesa3D GBM
We may build this plugin with window system support but run it without window system. Without this patch, the following pipeline will trigger a segfault when running it without window system. gst-launch-1.0 filesrc location=input.264 ! h264parse ! vaapih264dec ! fakesink Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/319>
Diffstat (limited to 'gst')
-rw-r--r--gst/vaapi/gstvaapipluginutil.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gst/vaapi/gstvaapipluginutil.c b/gst/vaapi/gstvaapipluginutil.c
index e344649e..ba89b4a7 100644
--- a/gst/vaapi/gstvaapipluginutil.c
+++ b/gst/vaapi/gstvaapipluginutil.c
@@ -157,6 +157,11 @@ gst_vaapi_get_display_type_from_gl (GstGLDisplayType gl_display_type,
return GST_VAAPI_DISPLAY_TYPE_EGL;
}
#endif
+#if USE_DRM
+ case GST_GL_DISPLAY_TYPE_GBM:{
+ return GST_VAAPI_DISPLAY_TYPE_DRM;
+ }
+#endif
default:
/* unsupported display. Still DRM may work. */
break;