Only allocate lv2:inPlaceBroken predicate once.

This commit is contained in:
Dave Robillard 2009-06-25 17:25:52 -04:00 committed by Stefan Kost
parent 7b14e0cb01
commit 1ef08edb7c

View file

@ -52,6 +52,7 @@ SLV2Value input_class;
SLV2Value output_class; SLV2Value output_class;
SLV2Value integer_prop; SLV2Value integer_prop;
SLV2Value toggled_prop; SLV2Value toggled_prop;
SLV2Value in_place_broken_pred;
static GstSignalProcessorClass *parent_class; static GstSignalProcessorClass *parent_class;
@ -211,11 +212,8 @@ gst_lv2_base_init (gpointer g_class)
g_free (details->author); g_free (details->author);
g_free (details); g_free (details);
pred = slv2_value_new_uri (world, if (!slv2_plugin_has_feature (lv2plugin, in_place_broken_pred))
"http://lv2plug.in/ns/lv2core#inPlaceBroken");
if (!slv2_plugin_has_feature (lv2plugin, pred))
GST_SIGNAL_PROCESSOR_CLASS_SET_CAN_PROCESS_IN_PLACE (klass); GST_SIGNAL_PROCESSOR_CLASS_SET_CAN_PROCESS_IN_PLACE (klass);
slv2_value_free (pred);
klass->plugin = lv2plugin; klass->plugin = lv2plugin;
} }
@ -574,6 +572,8 @@ plugin_init (GstPlugin * plugin)
slv2_value_new_uri (world, "http://lv2plug.in/ns/lv2core#integer"); slv2_value_new_uri (world, "http://lv2plug.in/ns/lv2core#integer");
toggled_prop = toggled_prop =
slv2_value_new_uri (world, "http://lv2plug.in/ns/lv2core#toggled"); slv2_value_new_uri (world, "http://lv2plug.in/ns/lv2core#toggled");
in_place_broken_pred = slv2_value_new_uri (world,
"http://lv2plug.in/ns/lv2core#inPlaceBroken");
parent_class = g_type_class_ref (GST_TYPE_SIGNAL_PROCESSOR); parent_class = g_type_class_ref (GST_TYPE_SIGNAL_PROCESSOR);