adapter: disable rate_match for the video adapter

We don't actually implement this for the video adapter. We should
ideally check for the SPA_IO_RateMatch param to decide this..
This commit is contained in:
Wim Taymans 2025-09-09 15:10:12 +02:00
parent 144c3630ea
commit 1e5a938e43
2 changed files with 7 additions and 2 deletions

View file

@ -93,6 +93,7 @@ struct impl {
struct spa_callbacks callbacks;
unsigned int add_listener:1;
unsigned int have_rate_match:1;
unsigned int have_format:1;
unsigned int recheck_format:1;
unsigned int started:1;
@ -283,7 +284,7 @@ static int link_io(struct impl *this)
spa_zero(this->io_rate_match);
this->io_rate_match.rate = 1.0;
if (this->follower == this->target) {
if (this->follower == this->target || !this->have_rate_match) {
rate_match = NULL;
rate_match_size = 0;
} else {
@ -2144,6 +2145,9 @@ impl_init(const struct spa_handle_factory *factory,
this->log = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_Log);
spa_log_topic_init(this->log, &log_topic);
/* FIXME, we should check the IO params for SPA_IO_RateMatch */
this->have_rate_match = true;
this->cpu = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_CPU);
this->ploader = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_PluginLoader);

View file

@ -94,6 +94,7 @@ struct impl {
struct spa_callbacks callbacks;
unsigned int add_listener:1;
unsigned int have_rate_match:1;
unsigned int have_format:1;
unsigned int recheck_format:1;
unsigned int started:1;
@ -284,7 +285,7 @@ static int link_io(struct impl *this)
spa_zero(this->io_rate_match);
this->io_rate_match.rate = 1.0;
if (this->follower == this->target) {
if (this->follower == this->target || !this->have_rate_match) {
rate_match = NULL;
rate_match_size = 0;
} else {