structure: use local variable earlier

This commit is contained in:
Stefan Kost 2009-11-16 13:53:44 +02:00
parent 7bd9299f3e
commit 94f6eced23

View file

@ -296,11 +296,9 @@ gst_structure_copy (const GstStructure * structure)
g_return_val_if_fail (structure != NULL, NULL);
new_structure =
gst_structure_id_empty_new_with_size (structure->name,
structure->fields->len);
len = structure->fields->len;
new_structure = gst_structure_id_empty_new_with_size (structure->name, len);
for (i = 0; i < len; i++) {
GstStructureField new_field = { 0 };