filter-graph: move loop out of the NULL check

This commit is contained in:
Wim Taymans 2025-07-17 12:01:14 +02:00
parent eb3d14053d
commit 4b37f3db3d

View file

@ -2821,7 +2821,11 @@ static void zeroramp_run(void * Instance, unsigned long SampleCount)
if (out == NULL)
return;
if (in != NULL) {
if (in == NULL) {
memset(out, 0, SampleCount * sizeof(float));
return;
}
for (n = 0; n < SampleCount; n++) {
if (impl->mode == 0) {
/* normal mode, finding gaps */
@ -2861,9 +2865,6 @@ static void zeroramp_run(void * Instance, unsigned long SampleCount)
}
}
}
} else {
memset(out, 0, SampleCount * sizeof(float));
}
}
static const struct spa_fga_descriptor zeroramp_desc = {