summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2020-05-18 17:32:27 +0200
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2020-07-27 19:34:46 +0200
commit7c2f5f1dd865381f45f97bd1c1c71fcc5ec1bdd4 (patch)
treee1a43a03a1c411ae5cf705d468e073f918d7c62a
parent88f3b6b44dc7f19445f504782a2842f2153ffa6f (diff)
vaapidecode: dma caps only use reported color format
This fix pipelines without vaapipostproc after vaapi decoder, such as gst-launch-1.0 filesrc location=~/file.mp4 ! parsebin ! vaapih264dec ! glimagesink On EGL platforms, so DMABuf is used. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/366>
-rw-r--r--gst/vaapi/gstvaapidecode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c
index 017c878e..4d9add3e 100644
--- a/gst/vaapi/gstvaapidecode.c
+++ b/gst/vaapi/gstvaapidecode.c
@@ -263,9 +263,9 @@ gst_vaapidecode_ensure_allowed_srcpad_caps (GstVaapiDecode * decode)
if (GST_VAAPI_PLUGIN_BASE_SRC_PAD_CAN_DMABUF (decode)
&& gst_vaapi_mem_type_supports (mem_types,
GST_VAAPI_BUFFER_MEMORY_TYPE_DMA_BUF)) {
- dma_caps = gst_caps_from_string (GST_VAAPI_MAKE_DMABUF_CAPS);
- caps_set_width_and_height_range (dma_caps, min_width, min_height, max_width,
- max_height);
+ dma_caps = gst_caps_copy (base_caps);
+ gst_caps_set_features_simple (va_caps,
+ gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_DMABUF));
}
#if (USE_GLX || USE_EGL)
if (!GST_VAAPI_PLUGIN_BASE_SRC_PAD_CAN_DMABUF (decode)