mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-13 13:30:05 -05:00
use format_copy
This commit is contained in:
parent
41399b0b25
commit
23d09d5b60
1 changed files with 2 additions and 5 deletions
|
|
@ -219,7 +219,6 @@ pinos_node_info_update (PinosNodeInfo *info,
|
||||||
{
|
{
|
||||||
uint64_t change_mask;
|
uint64_t change_mask;
|
||||||
int i;
|
int i;
|
||||||
size_t size;
|
|
||||||
|
|
||||||
if (update == NULL)
|
if (update == NULL)
|
||||||
return info;
|
return info;
|
||||||
|
|
@ -253,8 +252,7 @@ pinos_node_info_update (PinosNodeInfo *info,
|
||||||
info->input_formats = NULL;
|
info->input_formats = NULL;
|
||||||
}
|
}
|
||||||
for (i = 0; i < info->n_input_formats; i++) {
|
for (i = 0; i < info->n_input_formats; i++) {
|
||||||
size = SPA_POD_SIZE (update->input_formats[i]);
|
info->input_formats[i] = spa_format_copy (update->input_formats[i]);
|
||||||
info->input_formats[i] = memcpy (malloc (size), update->input_formats[i], size);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (update->change_mask & (1 << 3))
|
if (update->change_mask & (1 << 3))
|
||||||
|
|
@ -270,8 +268,7 @@ pinos_node_info_update (PinosNodeInfo *info,
|
||||||
info->output_formats = NULL;
|
info->output_formats = NULL;
|
||||||
}
|
}
|
||||||
for (i = 0; i < info->n_output_formats; i++) {
|
for (i = 0; i < info->n_output_formats; i++) {
|
||||||
size = SPA_POD_SIZE (update->output_formats[i]);
|
info->output_formats[i] = spa_format_copy (update->output_formats[i]);
|
||||||
info->output_formats[i] = memcpy (malloc (size), update->output_formats[i], size);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue