va: h264dec: check is pad has fixed caps at caps query

Otherwise it will always reply with the possible driver caps, which
generates problems with Web MSE players.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1583>
This commit is contained in:
Víctor Manuel Jáquez Leal 2020-09-17 19:52:29 +02:00
parent 2fe1afeafa
commit ad839ada5b

View file

@ -834,9 +834,13 @@ gst_va_h264_dec_src_query (GstVideoDecoder * decoder, GstQuery * query)
}
case GST_QUERY_CAPS:{
GstCaps *caps = NULL, *tmp, *filter = NULL;
gboolean fixed_caps;
gst_query_parse_caps (query, &filter);
if (self->decoder)
fixed_caps = GST_PAD_IS_FIXED_CAPS (GST_VIDEO_DECODER_SRC_PAD (decoder));
if (!fixed_caps && self->decoder)
caps = gst_va_decoder_get_srcpad_caps (self->decoder);
if (caps) {
if (filter) {