audioconvert: use the position rate to negotiate

When we have an io_position, use the rate as the samplerate when
negotiating.
This commit is contained in:
Wim Taymans 2021-06-14 12:12:59 +02:00
parent ed80d72d51
commit 7ba7179eee
4 changed files with 18 additions and 6 deletions

View file

@ -429,6 +429,7 @@ static int port_enum_formats(void *object,
} else {
uint32_t rate = this->io_position ?
this->io_position->clock.rate.denom : DEFAULT_RATE;
spa_pod_builder_add(builder,
SPA_FORMAT_AUDIO_rate, SPA_POD_CHOICE_RANGE_Int(
rate, 1, INT32_MAX),