mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
baseparse: fix broken default caps query
https://bugzilla.gnome.org/show_bug.cgi?id=664880
This commit is contained in:
parent
d3264c4b9d
commit
396c76a34e
1 changed files with 9 additions and 3 deletions
|
@ -1146,11 +1146,17 @@ gst_base_parse_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||||
|
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
} else {
|
} else {
|
||||||
GstCaps *caps, *filter;
|
GstCaps *caps, *template_caps, *filter;
|
||||||
|
|
||||||
gst_query_parse_caps (query, &filter);
|
gst_query_parse_caps (query, &filter);
|
||||||
caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
|
template_caps = gst_pad_get_pad_template_caps (pad);
|
||||||
gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
|
if (filter != NULL) {
|
||||||
|
caps =
|
||||||
|
gst_caps_intersect_full (filter, template_caps,
|
||||||
|
GST_CAPS_INTERSECT_FIRST);
|
||||||
|
} else {
|
||||||
|
caps = gst_caps_copy (template_caps);
|
||||||
|
}
|
||||||
gst_query_set_caps_result (query, caps);
|
gst_query_set_caps_result (query, caps);
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue