mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
endpoint: handle NULL name and media_class
This commit is contained in:
parent
2fddfb02bd
commit
8e24e57db0
1 changed files with 4 additions and 2 deletions
|
|
@ -68,6 +68,8 @@ static int endpoint_enum_params (void *object, int seq,
|
||||||
uint32_t next = start;
|
uint32_t next = start;
|
||||||
uint32_t count = 0;
|
uint32_t count = 0;
|
||||||
|
|
||||||
|
pw_log_debug(NAME" %p: param %u %d/%d", this, id, start, num);
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
index = next++;
|
index = next++;
|
||||||
if (index >= this->n_params)
|
if (index >= this->n_params)
|
||||||
|
|
@ -224,8 +226,8 @@ int endpoint_update(struct endpoint *this,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this->info.name) {
|
if (!this->info.name) {
|
||||||
this->info.name = strdup(info->name);
|
this->info.name = info->name ? strdup(info->name) : NULL;
|
||||||
this->info.media_class = strdup(info->media_class);
|
this->info.media_class = info->media_class ? strdup(info->media_class) : NULL;
|
||||||
this->info.direction = info->direction;
|
this->info.direction = info->direction;
|
||||||
this->info.flags = info->flags;
|
this->info.flags = info->flags;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue