From 9b5bc5199e58ccbe6a2a6adbf8d77a9cb22d2ded Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Sat, 5 Jun 2010 23:18:09 +0300 Subject: [PATCH] basetransform: avoid a caps-copy We can simply truncate the caps, as 'othercaps' is the result of intersect operations and thus ours and writable. --- libs/gst/base/gstbasetransform.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libs/gst/base/gstbasetransform.c b/libs/gst/base/gstbasetransform.c index 0644e6f139..56e997ba8d 100644 --- a/libs/gst/base/gstbasetransform.c +++ b/libs/gst/base/gstbasetransform.c @@ -880,8 +880,6 @@ gst_base_transform_find_transform (GstBaseTransform * trans, GstPad * pad, /* third attempt at fixation, call the fixate vmethod and * ultimately call the pad fixate function. */ if (!is_fixed) { - GstCaps *temp; - GST_DEBUG_OBJECT (trans, "trying to fixate %" GST_PTR_FORMAT " on pad %s:%s", 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 * each of the caps; but Wim doesn't see a use case for that yet */ - temp = gst_caps_copy_nth (othercaps, 0); - gst_caps_unref (othercaps); - othercaps = temp; + gst_caps_truncate (othercaps); peer_checked = FALSE; if (klass->fixate_caps) {