mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-21 22:58:16 +00:00
switchbin: Improve filter caps application
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4632>
This commit is contained in:
parent
9429a69f1c
commit
0f279cdb86
1 changed files with 6 additions and 1 deletions
|
@ -882,7 +882,12 @@ gst_switch_bin_get_allowed_caps (GstSwitchBin * switch_bin,
|
|||
/* Apply filter caps if present */
|
||||
if (filter != NULL) {
|
||||
GstCaps *tmp_caps = total_path_caps;
|
||||
total_path_caps = gst_caps_intersect (tmp_caps, filter);
|
||||
/* Use filter caps as first caps in intersection along with the
|
||||
* GST_CAPS_INTERSECT_FIRST mode. This makes it possible to
|
||||
* define the order of the resulting caps by making it follow
|
||||
* the order of the filter caps. */
|
||||
total_path_caps = gst_caps_intersect_full (filter, tmp_caps,
|
||||
GST_CAPS_INTERSECT_FIRST);
|
||||
gst_caps_unref (tmp_caps);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue