resample: fix compilation

Also fix a compiler warning in clang
This commit is contained in:
Wim Taymans 2025-07-23 12:52:27 +02:00
parent c54d3764b2
commit b52c490709
2 changed files with 4 additions and 2 deletions

View file

@ -167,8 +167,8 @@ static void impl_native_update_rate(struct resample *r, double rate)
data->inc = data->in_rate / data->out_rate; data->inc = data->in_rate / data->out_rate;
data->frac = data->in_rate % data->out_rate; data->frac = data->in_rate % data->out_rate;
spa_log_trace_fp(r->log, "native %p: rate:%f in:%d out:%d gcd:%d phase:%f inc:%d frac:%d", r, spa_log_trace_fp(r->log, "native %p: rate:%f in:%d out:%d phase:%f inc:%d frac:%d", r,
rate, r->i_rate, r->o_rate, gcd, data->phase, data->inc, data->frac); rate, r->i_rate, r->o_rate, data->phase, data->inc, data->frac);
} }

View file

@ -242,6 +242,7 @@ static int add_param(struct stream *impl,
switch (id) { switch (id) {
case SPA_PARAM_Latency: case SPA_PARAM_Latency:
{
struct spa_latency_info info; struct spa_latency_info info;
if ((res = spa_latency_parse(param, &info)) < 0) if ((res = spa_latency_parse(param, &info)) < 0)
return res; return res;
@ -254,6 +255,7 @@ static int add_param(struct stream *impl,
return 0; return 0;
} }
} }
}
p = malloc(sizeof(struct param) + SPA_POD_SIZE(param)); p = malloc(sizeof(struct param) + SPA_POD_SIZE(param));
if (p == NULL) if (p == NULL)