summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-07-30 00:48:10 +0200
committerLennart Poettering <lennart@poettering.net>2008-07-30 00:48:10 +0200
commit390cecb8a6fc1f56880759744b43d66b12e9323b (patch)
treef64f8286ee22c664769df39bf7a09a48923c7cc4 /src
parent5868fadaf15dbd41807c6f7a303c1ac8842cc703 (diff)
strip more properties when cacheing
Diffstat (limited to 'src')
-rw-r--r--src/pulse.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/pulse.c b/src/pulse.c
index 785c967..06e5874 100644
--- a/src/pulse.c
+++ b/src/pulse.c
@@ -118,13 +118,13 @@ static int convert_proplist(pa_proplist **_l, ca_proplist *c) {
return CA_SUCCESS;
}
-static pa_proplist *strip_canberra_data(pa_proplist *l) {
+static pa_proplist *strip_prefix(pa_proplist *l, const char *prefix) {
const char *key;
void *state = NULL;
ca_assert(l);
while ((key = pa_proplist_iterate(l, &state)))
- if (strncmp(key, "canberra.", 9) == 0)
+ if (strncmp(key, prefix, strlen(prefix)) == 0)
pa_proplist_unset(l, key);
return l;
@@ -389,7 +389,7 @@ int driver_change_props(ca_context *c, ca_proplist *changed, ca_proplist *merged
if ((ret = convert_proplist(&l, changed)) < 0)
return ret;
- strip_canberra_data(l);
+ strip_prefix(l, "canberra.");
pa_threaded_mainloop_lock(p->mainloop);
@@ -678,7 +678,7 @@ int driver_play(ca_context *c, uint32_t id, ca_proplist *proplist, ca_finish_cal
goto finish;
}
- strip_canberra_data(l);
+ strip_prefix(l, "canberra.");
if ((ret = subscribe(c)) < 0)
goto finish;
@@ -905,7 +905,9 @@ int driver_cache(ca_context *c, ca_proplist *proplist) {
goto finish;
}
- strip_canberra_data(l);
+ strip_prefix(l, "canberra.");
+ strip_prefix(l, "event.mouse.");
+ strip_prefix(l, "window.");
/* Let's stream the sample directly */
if ((ret = ca_lookup_sound(&out->file, &p->theme, c->props, proplist)) < 0)