filter-chain: fix max biquad check

This commit is contained in:
Wim Taymans 2024-10-14 09:44:19 +02:00
parent 34bca4a007
commit b3d9b4bb9e

View file

@ -1694,7 +1694,7 @@ static int load_eq_bands(struct param_eq_impl *impl, const char *filename)
FILE *f = NULL; FILE *f = NULL;
char *line = NULL; char *line = NULL;
ssize_t nread; ssize_t nread;
size_t linelen, n = 0; size_t linelen;
uint32_t freq; uint32_t freq;
char filter_type[4]; char filter_type[4];
char filter[4]; char filter[4];
@ -1726,7 +1726,7 @@ static int load_eq_bands(struct param_eq_impl *impl, const char *filename)
} }
/* Read the filter bands */ /* Read the filter bands */
while ((nread = getline(&line, &linelen, f)) != -1) { while ((nread = getline(&line, &linelen, f)) != -1) {
if (n == PARAM_EQ_MAX) { if (impl->n_bq == PARAM_EQ_MAX) {
res = -ENOSPC; res = -ENOSPC;
goto exit; goto exit;
} }