From 4c793cfc76360676b3881d7943b49adf892594d2 Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Thu, 3 Dec 2009 13:22:05 +0200 Subject: libpulse: Store pa_stream pointers to hashmaps instead of dynarrays. Since the stream identifiers (channels) are monotonically growing integer, it isn't a good idea to use them as index to a dynamic array, because the array will grow all the time. This is not a problem with client connections that don't create many streams, but, for example, long-running clients that use libcanberra for playing event sounds, this means that the client connection effectively leaks memory. --- src/pulse/internal.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/pulse/internal.h') diff --git a/src/pulse/internal.h b/src/pulse/internal.h index b371bfc2..9545d500 100644 --- a/src/pulse/internal.h +++ b/src/pulse/internal.h @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -66,7 +65,7 @@ struct pa_context { pa_pstream *pstream; pa_pdispatch *pdispatch; - pa_dynarray *record_streams, *playback_streams; + pa_hashmap *record_streams, *playback_streams; PA_LLIST_HEAD(pa_stream, streams); PA_LLIST_HEAD(pa_operation, operations); -- cgit