From 9b316f6deb8f4c718d16a566f6e80a513833097b Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 14 May 2025 17:02:46 +0200 Subject: [PATCH] filter-graph: remove port check Remove the port number check, we never call this with an invalid port number and the check was wrong for the sofa_plugin. Fixes #4700 --- spa/plugins/filter-graph/ebur128_plugin.c | 6 ++---- spa/plugins/filter-graph/sofa_plugin.c | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/spa/plugins/filter-graph/ebur128_plugin.c b/spa/plugins/filter-graph/ebur128_plugin.c index a7aeeef99..0c94449ff 100644 --- a/spa/plugins/filter-graph/ebur128_plugin.c +++ b/spa/plugins/filter-graph/ebur128_plugin.c @@ -222,8 +222,7 @@ static void ebur128_connect_port(void * Instance, unsigned long Port, float * DataLocation) { struct ebur128_impl *impl = Instance; - if (Port < PORT_MAX) - impl->port[Port] = DataLocation; + impl->port[Port] = DataLocation; } static void ebur128_cleanup(void * Instance) @@ -446,8 +445,7 @@ static void lufs2gain_connect_port(void * Instance, unsigned long Port, float * DataLocation) { struct lufs2gain_impl *impl = Instance; - if (Port < 3) - impl->port[Port] = DataLocation; + impl->port[Port] = DataLocation; } static void lufs2gain_run(void * Instance, unsigned long SampleCount) diff --git a/spa/plugins/filter-graph/sofa_plugin.c b/spa/plugins/filter-graph/sofa_plugin.c index 2942ed3bc..aea14278f 100644 --- a/spa/plugins/filter-graph/sofa_plugin.c +++ b/spa/plugins/filter-graph/sofa_plugin.c @@ -319,8 +319,6 @@ static void spatializer_connect_port(void * Instance, unsigned long Port, float * DataLocation) { struct spatializer_impl *impl = Instance; - if (Port > 5) - return; impl->port[Port] = DataLocation; }