vaapidecode: use allowed srcpad caps for caps query

Instead of using just the template caps use the current allowed
srcpad caps, which is created considering the current decoder
context.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/366>
This commit is contained in:
Víctor Manuel Jáquez Leal 2020-02-07 17:10:45 +01:00
parent 634fefab5d
commit 88f3b6b44d

View file

@ -1433,10 +1433,9 @@ gst_vaapidecode_src_query (GstVideoDecoder * vdec, GstQuery * query)
switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_CAPS:{
GstCaps *caps, *filter = NULL;
GstPad *pad = GST_VIDEO_DECODER_SRC_PAD (vdec);
gst_query_parse_caps (query, &filter);
caps = gst_pad_get_pad_template_caps (pad);
caps = gst_vaapidecode_get_allowed_srcpad_caps (GST_VAAPIDECODE (vdec));
if (filter) {
GstCaps *tmp = caps;