mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-06 18:52:07 +00:00
basetransform: avoid a caps-copy
We can simply truncate the caps, as 'othercaps' is the result of intersect operations and thus ours and writable.
This commit is contained in:
parent
66fc4c8ba2
commit
9b5bc5199e
1 changed files with 1 additions and 5 deletions
|
@ -880,8 +880,6 @@ gst_base_transform_find_transform (GstBaseTransform * trans, GstPad * pad,
|
||||||
/* third attempt at fixation, call the fixate vmethod and
|
/* third attempt at fixation, call the fixate vmethod and
|
||||||
* ultimately call the pad fixate function. */
|
* ultimately call the pad fixate function. */
|
||||||
if (!is_fixed) {
|
if (!is_fixed) {
|
||||||
GstCaps *temp;
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (trans,
|
GST_DEBUG_OBJECT (trans,
|
||||||
"trying to fixate %" GST_PTR_FORMAT " on pad %s:%s",
|
"trying to fixate %" GST_PTR_FORMAT " on pad %s:%s",
|
||||||
othercaps, GST_DEBUG_PAD_NAME (otherpad));
|
othercaps, GST_DEBUG_PAD_NAME (otherpad));
|
||||||
|
@ -891,9 +889,7 @@ gst_base_transform_find_transform (GstBaseTransform * trans, GstPad * pad,
|
||||||
|
|
||||||
/* FIXME: when fixating using the vmethod, it might make sense to fixate
|
/* FIXME: when fixating using the vmethod, it might make sense to fixate
|
||||||
* each of the caps; but Wim doesn't see a use case for that yet */
|
* each of the caps; but Wim doesn't see a use case for that yet */
|
||||||
temp = gst_caps_copy_nth (othercaps, 0);
|
gst_caps_truncate (othercaps);
|
||||||
gst_caps_unref (othercaps);
|
|
||||||
othercaps = temp;
|
|
||||||
peer_checked = FALSE;
|
peer_checked = FALSE;
|
||||||
|
|
||||||
if (klass->fixate_caps) {
|
if (klass->fixate_caps) {
|
||||||
|
|
Loading…
Reference in a new issue