mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 14:06:23 +00:00
deinterleave: Return the current caps on the srcpads on caps queries
It's not like we could accept any other caps here. The caps are decided by the upstream caps event. Also keep the filter order intact when filtering the results against the filter caps. https://bugzilla.gnome.org/show_bug.cgi?id=763326
This commit is contained in:
parent
206e24855a
commit
239cf06d81
1 changed files with 14 additions and 1 deletions
|
@ -556,6 +556,19 @@ gst_deinterleave_getcaps (GstPad * pad, GstObject * parent, GstCaps * filter)
|
|||
GstIteratorResult res;
|
||||
GValue v = G_VALUE_INIT;
|
||||
|
||||
if (pad != self->sink) {
|
||||
ret = gst_pad_get_current_caps (pad);
|
||||
if (ret) {
|
||||
if (filter) {
|
||||
GstCaps *tmp =
|
||||
gst_caps_intersect_full (filter, ret, GST_CAPS_INTERSECT_FIRST);
|
||||
gst_caps_unref (ret);
|
||||
ret = tmp;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
/* Intersect all of our pad template caps with the peer caps of the pad
|
||||
* to get all formats that are possible up- and downstream.
|
||||
*
|
||||
|
@ -636,7 +649,7 @@ gst_deinterleave_getcaps (GstPad * pad, GstObject * parent, GstCaps * filter)
|
|||
if (filter) {
|
||||
GstCaps *aux;
|
||||
|
||||
aux = gst_caps_intersect (ret, filter);
|
||||
aux = gst_caps_intersect_full (filter, ret, GST_CAPS_INTERSECT_FIRST);
|
||||
gst_caps_unref (ret);
|
||||
ret = aux;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue