Browse Source

pt4

tags/1.9.4
falkTX 10 years ago
parent
commit
626ad76b1d
1 changed files with 8 additions and 8 deletions
  1. +8
    -8
      source/modules/lilv/lilv-0.16.0/src/instance.c

+ 8
- 8
source/modules/lilv/lilv-0.16.0/src/instance.c View File

@@ -31,12 +31,6 @@ lilv_plugin_instantiate(const LilvPlugin* plugin,

LilvInstance* result = NULL;

const LV2_Feature** local_features = NULL;
if (features == NULL) {
local_features = (const LV2_Feature**)malloc(sizeof(LV2_Feature));
local_features[0] = NULL;
}

const LilvNode* const lib_uri = lilv_plugin_get_library_uri(plugin);
const LilvNode* const bundle_uri = lilv_plugin_get_bundle_uri(plugin);

@@ -56,6 +50,12 @@ lilv_plugin_instantiate(const LilvPlugin* plugin,
return NULL;
}

const LV2_Feature** local_features = NULL;
if (features == NULL) {
local_features = (const LV2_Feature**)malloc(sizeof(LV2_Feature));
local_features[0] = NULL;
}

// Search for plugin by URI
for (uint32_t i = 0; true; ++i) {
const LV2_Descriptor* ld = lilv_lib_get_plugin(lib, i);
@@ -93,6 +93,8 @@ lilv_plugin_instantiate(const LilvPlugin* plugin,
}
}

free(local_features);

if (result) {
// Failed to instantiate
if (result->lv2_handle == NULL) {
@@ -105,8 +107,6 @@ lilv_plugin_instantiate(const LilvPlugin* plugin,
result->lv2_descriptor->connect_port(result->lv2_handle, i, NULL);
}

free(local_features);

return result;
}



Loading…
Cancel
Save