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>
This commit is contained in:
Víctor Manuel Jáquez Leal 2020-05-18 17:32:27 +02:00
parent 88f3b6b44d
commit 7c2f5f1dd8

View file

@ -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)