diff options
author | Haihao Xiang <haihao.xiang@intel.com> | 2020-04-26 13:30:16 +0800 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2020-06-07 00:58:43 +0100 |
commit | 50c23f18dd02d1a4453bc05c4f0b6ea6d9853545 (patch) | |
tree | 15968fed4bf75d6890406343dd51afb42846410c | |
parent | 73fe04896a7c67cf276558856d692ee74cdd550b (diff) | |
download | gstreamer-vaapi-50c23f18dd02d1a4453bc05c4f0b6ea6d9853545.tar.gz |
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>
-rw-r--r-- | gst/vaapi/gstvaapipluginutil.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gst/vaapi/gstvaapipluginutil.c b/gst/vaapi/gstvaapipluginutil.c index b4699726..100c1d12 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; |