path: root/src/pulse/internal.h
diff options
authorTanu Kaskinen <>2009-12-03 13:22:05 +0200
committerColin Guthrie <>2009-12-03 21:47:46 +0000
commit4c793cfc76360676b3881d7943b49adf892594d2 (patch)
tree93377259f55938394bcdc5fdf579806098953e4c /src/pulse/internal.h
parent118466638aa651eac0d20513d348ddcc446bb5e6 (diff)
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.
Diffstat (limited to 'src/pulse/internal.h')
1 files changed, 1 insertions, 2 deletions
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 <pulsecore/socket-client.h>
#include <pulsecore/pstream.h>
#include <pulsecore/pdispatch.h>
-#include <pulsecore/dynarray.h>
#include <pulsecore/llist.h>
#include <pulsecore/native-common.h>
#include <pulsecore/strlist.h>
@@ -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);