basetransform: take size once

This commit is contained in:
Stefan Kost 2009-07-10 20:04:48 +01:00
parent c686053aac
commit 3ce0c64b45

View file

@ -472,9 +472,10 @@ gst_base_transform_transform_caps (GstBaseTransform * trans,
temp = gst_caps_make_writable (temp); temp = gst_caps_make_writable (temp);
gst_caps_append (ret, temp); gst_caps_append (ret, temp);
} else { } else {
gint n = gst_caps_get_size (caps);
/* we send caps with just one structure to the transform /* we send caps with just one structure to the transform
* function as this is easier for the element */ * function as this is easier for the element */
for (i = 0; i < gst_caps_get_size (caps); i++) { for (i = 0; i < n; i++) {
GstCaps *nth; GstCaps *nth;
nth = gst_caps_copy_nth (caps, i); nth = gst_caps_copy_nth (caps, i);