mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
autoconvert: merge caps instead of using union
It's a lot faster, and preserves caps ordering. https://bugzilla.gnome.org/show_bug.cgi?id=663346
This commit is contained in:
parent
ab27c0da8e
commit
9674c5aefa
1 changed files with 4 additions and 12 deletions
|
@ -1277,14 +1277,10 @@ gst_auto_convert_sink_getcaps (GstPad * pad)
|
|||
if (element_caps) {
|
||||
if (!gst_caps_is_any (element_caps) &&
|
||||
!gst_caps_is_empty (element_caps)) {
|
||||
GstCaps *tmpcaps = NULL;
|
||||
|
||||
tmpcaps = gst_caps_union (caps, element_caps);
|
||||
gst_caps_unref (caps);
|
||||
caps = tmpcaps;
|
||||
|
||||
gst_caps_merge (caps, element_caps);
|
||||
} else {
|
||||
gst_caps_unref (element_caps);
|
||||
}
|
||||
gst_caps_unref (element_caps);
|
||||
}
|
||||
|
||||
gst_object_unref (element);
|
||||
|
@ -1298,11 +1294,7 @@ gst_auto_convert_sink_getcaps (GstPad * pad)
|
|||
|
||||
if (static_caps && !gst_caps_is_any (static_caps) &&
|
||||
!gst_caps_is_empty (static_caps)) {
|
||||
GstCaps *tmpcaps = NULL;
|
||||
|
||||
tmpcaps = gst_caps_union (caps, static_caps);
|
||||
gst_caps_unref (caps);
|
||||
caps = tmpcaps;
|
||||
gst_caps_merge (caps, static_caps);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue