mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-27 21:37:37 -04:00
convert: use static string for convertname
We only use it for debugging and checking if it's the default converter.
This commit is contained in:
parent
06ba2f792d
commit
9972df2614
2 changed files with 5 additions and 8 deletions
|
|
@ -64,7 +64,7 @@ struct impl {
|
||||||
struct spa_node *convert;
|
struct spa_node *convert;
|
||||||
struct spa_hook convert_listener;
|
struct spa_hook convert_listener;
|
||||||
uint64_t convert_port_flags;
|
uint64_t convert_port_flags;
|
||||||
char *convertname;
|
char convertname[64];
|
||||||
|
|
||||||
uint32_t n_buffers;
|
uint32_t n_buffers;
|
||||||
struct spa_buffer **buffers;
|
struct spa_buffer **buffers;
|
||||||
|
|
@ -1996,7 +1996,7 @@ static int load_converter(struct impl *this, const struct spa_dict *info,
|
||||||
this->hnd_convert = hnd_convert;
|
this->hnd_convert = hnd_convert;
|
||||||
this->convert = iface_conv;
|
this->convert = iface_conv;
|
||||||
this->unload_handle = unload_handle;
|
this->unload_handle = unload_handle;
|
||||||
this->convertname = strdup(factory_name);
|
snprintf(this->convertname, sizeof(this->convertname), "%s", factory_name);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -2129,7 +2129,6 @@ static int impl_clear(struct spa_handle *handle)
|
||||||
spa_handle_clear(this->hnd_convert);
|
spa_handle_clear(this->hnd_convert);
|
||||||
free(this->hnd_convert);
|
free(this->hnd_convert);
|
||||||
}
|
}
|
||||||
free(this->convertname);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clear_buffers(this);
|
clear_buffers(this);
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ struct impl {
|
||||||
struct spa_node *convert;
|
struct spa_node *convert;
|
||||||
struct spa_hook convert_listener;
|
struct spa_hook convert_listener;
|
||||||
uint64_t convert_port_flags;
|
uint64_t convert_port_flags;
|
||||||
char *convertname;
|
char convertname[64];
|
||||||
|
|
||||||
uint32_t n_buffers;
|
uint32_t n_buffers;
|
||||||
struct spa_buffer **buffers;
|
struct spa_buffer **buffers;
|
||||||
|
|
@ -1945,7 +1945,7 @@ static int load_converter(struct impl *this, const struct spa_dict *info,
|
||||||
|
|
||||||
this->hnd_convert = hnd_convert;
|
this->hnd_convert = hnd_convert;
|
||||||
this->convert = iface_conv;
|
this->convert = iface_conv;
|
||||||
this->convertname = strdup(factory_name);
|
snprintf(this->convertname, sizeof(this->convertname), "%s", factory_name);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -1978,10 +1978,8 @@ static int impl_clear(struct spa_handle *handle)
|
||||||
spa_hook_remove(&this->follower_listener);
|
spa_hook_remove(&this->follower_listener);
|
||||||
spa_node_set_callbacks(this->follower, NULL, NULL);
|
spa_node_set_callbacks(this->follower, NULL, NULL);
|
||||||
|
|
||||||
if (this->hnd_convert) {
|
if (this->hnd_convert)
|
||||||
spa_plugin_loader_unload(this->ploader, this->hnd_convert);
|
spa_plugin_loader_unload(this->ploader, this->hnd_convert);
|
||||||
free(this->convertname);
|
|
||||||
}
|
|
||||||
|
|
||||||
clear_buffers(this);
|
clear_buffers(this);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue