From 82f7ed419c02062b83e6576e1961ee7963cc9a92 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 18 Nov 2022 09:29:23 +0100 Subject: [PATCH] audioconvert: shortcut configure_format When we don't have a format and can't to clear it, we can return immediately. --- spa/plugins/audioconvert/audioadapter.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spa/plugins/audioconvert/audioadapter.c b/spa/plugins/audioconvert/audioadapter.c index bab9fc254..8f66dec76 100644 --- a/spa/plugins/audioconvert/audioadapter.c +++ b/spa/plugins/audioconvert/audioadapter.c @@ -438,6 +438,9 @@ static int configure_format(struct impl *this, uint32_t flags, const struct spa_ { int res; + if (format == NULL && !this->have_format) + return 0; + spa_log_debug(this->log, "%p: configure format:", this); if (format && spa_log_level_enabled(this->log, SPA_LOG_LEVEL_DEBUG)) spa_debug_format(0, NULL, format);