summaryrefslogtreecommitdiffstats
path: root/src/pulse/internal.h
diff options
context:
space:
mode:
authorTanu Kaskinen <ext-tanu.kaskinen@nokia.com>2009-12-03 13:22:05 +0200
committerLennart Poettering <lennart@poettering.net>2010-01-15 01:38:19 +0100
commit52c66b47664d47154b2c8368e32beef27d4b2d03 (patch)
tree368a1dcf5e200f14c136d7c56ee275785a934be3 /src/pulse/internal.h
parentfd5c802ecb5ae5ed9b294422410761126a37d1b3 (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')
-rw-r--r--src/pulse/internal.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pulse/internal.h b/src/pulse/internal.h
index c3ebf743..ab702b99 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);