mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
filter-chain: review suggestions
This commit is contained in:
parent
2251b9b1d9
commit
051d223d73
1 changed files with 3 additions and 6 deletions
|
|
@ -674,15 +674,13 @@ static void * convolver_instantiate(const struct fc_descriptor * Descriptor,
|
|||
const char *val;
|
||||
char key[256], v[256];
|
||||
char filename[PATH_MAX] = "";
|
||||
char *filenames[MAX_RATES];
|
||||
char *filenames[MAX_RATES] = { 0 };
|
||||
int blocksize = 0, tailsize = 0;
|
||||
int delay = 0;
|
||||
int resample_quality = RESAMPLE_DEFAULT_QUALITY;
|
||||
float gain = 1.0f;
|
||||
unsigned long rate;
|
||||
|
||||
spa_zero(filenames);
|
||||
|
||||
errno = EINVAL;
|
||||
if (config == NULL)
|
||||
return NULL;
|
||||
|
|
@ -727,9 +725,8 @@ static void * convolver_instantiate(const struct fc_descriptor * Descriptor,
|
|||
pw_log_error("convolver:filenames requires an array");
|
||||
return NULL;
|
||||
}
|
||||
while (spa_json_get_string(&filenames_json, v, sizeof(v)) > 0 && i < MAX_RATES) {
|
||||
filenames[i] = calloc(strlen(v) + 1, sizeof(char));
|
||||
strncpy(filenames[i], v, strlen(v));
|
||||
while (spa_json_get_string(&filenames_json, v, sizeof(v)) > 0 && i < SPA_N_ELEMENTS(filenames)) {
|
||||
filenames[i] = strdup(v);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue