[pulseaudio-discuss] [PATCH 2/3] tunnel: use proper value for pa_source_state switch

Boris Egorov egorov at linux.com
Mon Jan 12 09:52:11 PST 2015


pa_source_state_t can have value PA_SOURCE_INVALID_STATE, not
PA_SINK_INVALID_STATE. It happens to be the same here, but it can break
sometimes.

Issue detected by PVS Studio.
---
 src/modules/module-tunnel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/module-tunnel.c b/src/modules/module-tunnel.c
index bef6ae8..6600219 100644
--- a/src/modules/module-tunnel.c
+++ b/src/modules/module-tunnel.c
@@ -691,7 +691,7 @@ static int source_set_state(pa_source *s, pa_source_state_t state) {
 
         case PA_SOURCE_UNLINKED:
         case PA_SOURCE_INIT:
-        case PA_SINK_INVALID_STATE:
+        case PA_SOURCE_INVALID_STATE:
             ;
     }
 
-- 
2.1.4



More information about the pulseaudio-discuss mailing list