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;
|
const char *val;
|
||||||
char key[256], v[256];
|
char key[256], v[256];
|
||||||
char filename[PATH_MAX] = "";
|
char filename[PATH_MAX] = "";
|
||||||
char *filenames[MAX_RATES];
|
char *filenames[MAX_RATES] = { 0 };
|
||||||
int blocksize = 0, tailsize = 0;
|
int blocksize = 0, tailsize = 0;
|
||||||
int delay = 0;
|
int delay = 0;
|
||||||
int resample_quality = RESAMPLE_DEFAULT_QUALITY;
|
int resample_quality = RESAMPLE_DEFAULT_QUALITY;
|
||||||
float gain = 1.0f;
|
float gain = 1.0f;
|
||||||
unsigned long rate;
|
unsigned long rate;
|
||||||
|
|
||||||
spa_zero(filenames);
|
|
||||||
|
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
if (config == NULL)
|
if (config == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -727,9 +725,8 @@ static void * convolver_instantiate(const struct fc_descriptor * Descriptor,
|
||||||
pw_log_error("convolver:filenames requires an array");
|
pw_log_error("convolver:filenames requires an array");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
while (spa_json_get_string(&filenames_json, v, sizeof(v)) > 0 && i < MAX_RATES) {
|
while (spa_json_get_string(&filenames_json, v, sizeof(v)) > 0 && i < SPA_N_ELEMENTS(filenames)) {
|
||||||
filenames[i] = calloc(strlen(v) + 1, sizeof(char));
|
filenames[i] = strdup(v);
|
||||||
strncpy(filenames[i], v, strlen(v));
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue