jack: ensure transport frame_rate is not 0

Try harder to get the transport frame_rate from the position.
If we can't find an activation structure, use the configured frame_rate
instead of 0.

Fixes #1432
This commit is contained in:
Wim Taymans 2021-07-19 11:50:28 +02:00
parent a91502b3e0
commit 1531f78965

View file

@ -5251,11 +5251,14 @@ jack_transport_state_t jack_transport_query (const jack_client_t *client,
spa_return_val_if_fail(c != NULL, JackTransportStopped);
if (SPA_LIKELY((a = c->rt.driver_activation) != NULL))
if (SPA_LIKELY((a = c->rt.driver_activation) != NULL)) {
jack_state = position_to_jack(a, pos);
else if (pos != NULL)
} else if ((a = c->driver_activation) != NULL) {
jack_state = position_to_jack(a, pos);
} else if (pos != NULL) {
memset(pos, 0, sizeof(jack_position_t));
pos->frame_rate = jack_get_sample_rate((jack_client_t*)client);
}
return jack_state;
}