diff --git a/pinos/modules/spa/spa-alsa-sink.c b/pinos/modules/spa/spa-alsa-sink.c index 777344587..a383f3040 100644 --- a/pinos/modules/spa/spa-alsa-sink.c +++ b/pinos/modules/spa/spa-alsa-sink.c @@ -79,7 +79,8 @@ make_node (SpaHandle **handle, const SpaNode **node, const char *lib, const char if (strcmp (factory->name, name)) continue; - if ((res = factory->instantiate (factory, handle)) < 0) { + *handle = calloc (1, factory->size); + if ((res = factory->init (factory, *handle)) < 0) { g_error ("can't make factory instance: %d", res); return res; } diff --git a/pinos/modules/spa/spa-v4l2-source.c b/pinos/modules/spa/spa-v4l2-source.c index ff0b28a0f..19cd7f773 100644 --- a/pinos/modules/spa/spa-v4l2-source.c +++ b/pinos/modules/spa/spa-v4l2-source.c @@ -98,7 +98,8 @@ make_node (SpaHandle **handle, const SpaNode **node, const char *lib, const char if (strcmp (factory->name, name)) continue; - if ((res = factory->instantiate (factory, handle)) < 0) { + *handle = calloc (1, factory->size); + if ((res = factory->init (factory, *handle)) < 0) { g_error ("can't make factory instance: %d", res); return res; }