From 880ba08033aaf0c01e639a402963fdc853a3a2e5d29047b310fc8c66206ec183 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 17 Nov 2008 16:52:37 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pulseaudio?expand=0&rev=37 --- pulseaudio-allow-in-sample-names.patch | 124 +++++++++++++++++++++++++ pulseaudio.changes | 5 + pulseaudio.spec | 17 ++-- 3 files changed, 140 insertions(+), 6 deletions(-) create mode 100644 pulseaudio-allow-in-sample-names.patch diff --git a/pulseaudio-allow-in-sample-names.patch b/pulseaudio-allow-in-sample-names.patch new file mode 100644 index 0000000..e3c7de9 --- /dev/null +++ b/pulseaudio-allow-in-sample-names.patch @@ -0,0 +1,124 @@ +From: Lennart Poettering +Date: Fri, 3 Oct 2008 17:49:15 +0000 (+0200) +Subject: allow - in sample names +X-Git-Tag: v0.9.13~18 +X-Git-Url: http://git.0pointer.de/?p=pulseaudio.git;a=commitdiff_plain;h=c0815deb4add5ae4598de7c2c0589d1f5dc1c641 + +allow - in sample names +--- + +diff --git a/src/pulsecore/core-scache.c b/src/pulsecore/core-scache.c +index 814dff5..1d080e1 100644 +--- a/src/pulsecore/core-scache.c ++++ b/src/pulsecore/core-scache.c +@@ -98,7 +98,7 @@ static pa_scache_entry* scache_add_item(pa_core *c, const char *name) { + pa_assert(c); + pa_assert(name); + +- if ((e = pa_namereg_get(c, name, PA_NAMEREG_SAMPLE, 0))) { ++ if ((e = pa_namereg_get(c, name, PA_NAMEREG_SAMPLE, FALSE))) { + if (e->memchunk.memblock) + pa_memblock_unref(e->memchunk.memblock); + +@@ -111,7 +111,7 @@ static pa_scache_entry* scache_add_item(pa_core *c, const char *name) { + } else { + e = pa_xnew(pa_scache_entry, 1); + +- if (!pa_namereg_register(c, name, PA_NAMEREG_SAMPLE, e, 1)) { ++ if (!pa_namereg_register(c, name, PA_NAMEREG_SAMPLE, e, TRUE)) { + pa_xfree(e); + return NULL; + } +@@ -134,9 +134,11 @@ static pa_scache_entry* scache_add_item(pa_core *c, const char *name) { + e->lazy = FALSE; + e->last_used_time = 0; + +- memset(&e->sample_spec, 0, sizeof(e->sample_spec)); ++ e->sample_spec.format = PA_SAMPLE_INVALID; ++ e->sample_spec.rate = e->sample_spec.channels = 0; + pa_channel_map_init(&e->channel_map); +- pa_cvolume_reset(&e->volume, PA_CHANNELS_MAX); ++ pa_cvolume_set(&e->volume, 1, -1); ++ e->volume.channels = 0; + + pa_proplist_sets(e->proplist, PA_PROP_MEDIA_ROLE, "event"); + +@@ -159,10 +159,12 @@ int pa_scache_add_item( + pa_assert(c); + pa_assert(name); + pa_assert(!ss || pa_sample_spec_valid(ss)); +- pa_assert(!map || (pa_channel_map_valid(map) && ss && ss->channels == map->channels)); ++ pa_assert(!map || (pa_channel_map_valid(map) && ss && pa_channel_map_compatible(map, ss))); + +- if (ss && !map) ++ if (ss && !map) { + pa_channel_map_init_extend(&tmap, ss->channels, PA_CHANNEL_MAP_DEFAULT); ++ map = &tmap; ++ } + + if (chunk && chunk->length > PA_SCACHE_ENTRY_SIZE_MAX) + return -1; +@@ -170,12 +172,15 @@ int pa_scache_add_item( + if (!(e = scache_add_item(c, name))) + return -1; + +- memset(&e->sample_spec, 0, sizeof(e->sample_spec)); ++ e->sample_spec.format = PA_SAMPLE_INVALID; ++ e->sample_spec.rate = e->sample_spec.channels = 0; + pa_channel_map_init(&e->channel_map); ++ pa_cvolume_set(&e->volume, 1, -1); ++ e->volume.channels = 0; + + if (ss) { + e->sample_spec = *ss; +- e->volume.channels = e->sample_spec.channels; ++ pa_cvolume_reset(&e->volume, ss->channels); + } + + if (map) +@@ -310,17 +313,21 @@ int pa_scache_play_item(pa_core *c, const char *name, pa_sink *sink, pa_volume_t + pa_assert(name); + pa_assert(sink); + +- if (!(e = pa_namereg_get(c, name, PA_NAMEREG_SAMPLE, 1))) ++ if (!(e = pa_namereg_get(c, name, PA_NAMEREG_SAMPLE, FALSE))) + return -1; + + if (e->lazy && !e->memchunk.memblock) { ++ pa_channel_map old_channel_map = e->channel_map; ++ + if (pa_sound_file_load(c->mempool, e->filename, &e->sample_spec, &e->channel_map, &e->memchunk) < 0) + return -1; + + pa_subscription_post(c, PA_SUBSCRIPTION_EVENT_SAMPLE_CACHE|PA_SUBSCRIPTION_EVENT_CHANGE, e->index); + +- if (e->volume.channels > e->sample_spec.channels) +- e->volume.channels = e->sample_spec.channels; ++ if (pa_cvolume_valid(&e->volume)) ++ pa_cvolume_remap(&e->volume, &old_channel_map, &e->channel_map); ++ else ++ pa_cvolume_reset(&e->volume, e->sample_spec.channels); + } + + if (!e->memchunk.memblock) +@@ -383,7 +390,7 @@ uint32_t pa_scache_get_id_by_name(pa_core *c, const char *name) { + pa_assert(c); + pa_assert(name); + +- if (!(e = pa_namereg_get(c, name, PA_NAMEREG_SAMPLE, 0))) ++ if (!(e = pa_namereg_get(c, name, PA_NAMEREG_SAMPLE, FALSE))) + return PA_IDXSET_INVALID; + + return e->index; +diff --git a/src/pulsecore/namereg.c b/src/pulsecore/namereg.c +index ad702e4..ecd8def 100644 +--- a/src/pulsecore/namereg.c ++++ b/src/pulsecore/namereg.c +@@ -51,6 +51,7 @@ static pa_bool_t is_valid_char(char c) { + (c >= 'A' && c <= 'Z') || + (c >= '0' && c <= '9') || + c == '.' || ++ c == '-' || + c == '_'; + } + diff --git a/pulseaudio.changes b/pulseaudio.changes index 90beb5d..c34f7b0 100644 --- a/pulseaudio.changes +++ b/pulseaudio.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 11 19:32:04 CET 2008 - rodrigo@novell.com + +- Add upstream patch for bnc#439054 + ------------------------------------------------------------------- Mon Oct 27 14:26:30 CEST 2008 - rodrigo@novell.com diff --git a/pulseaudio.spec b/pulseaudio.spec index 49ccfca..ddb2af7 100644 --- a/pulseaudio.spec +++ b/pulseaudio.spec @@ -22,7 +22,7 @@ Name: pulseaudio %define drvver 0.9 Summary: A Networked Sound Server Version: 0.9.12 -Release: 6 +Release: 7 License: GPL v2 or later; LGPL v2.1 or later Group: System/Sound Daemons Source: %{name}-%{version}.tar.bz2 @@ -38,6 +38,8 @@ PreReq: pwdutils Patch3: pulseaudio-defaults-daemon-conf.patch # PATCH-FIX-UPSTREAM pulseaudio-dot-pulse.patch Patch4: pulseaudio-dot-pulse.patch +# PATCH-FIX-UPSTREAM pulseaudio-allow-in-sample-names.patch bnc#439054 +Patch5: pulseaudio-allow-in-sample-names.patch %description pulseaudio is a networked sound server for Linux and other Unix like @@ -316,6 +318,7 @@ Authors: %setup -q -T -b0 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %build autoreconf -fi @@ -542,6 +545,8 @@ groupadd -r pulse-access &>/dev/null || : %{_mandir}/man1/pax11publish.1.gz %changelog +* Tue Nov 11 2008 rodrigo@novell.com +- Add upstream patch for bnc#439054 * Mon Oct 27 2008 rodrigo@novell.com - Fixed some bugs in setup-pulseaudio script (bnc#425475) * Thu Oct 16 2008 maw@novell.com @@ -586,7 +591,7 @@ groupadd -r pulse-access &>/dev/null || : + Additional stream attributes for libcanberra - Added new BuildRequires - Added new modules to list of installed files -* Sat Jun 28 2008 maw@suse.de +* Fri Jun 27 2008 maw@suse.de - Own some directories so that builds succeed. * Tue Jun 24 2008 rodrigo@suse.de - Added .desktop file for autostarting under GNOME (bnc#387052) @@ -595,7 +600,7 @@ groupadd -r pulse-access &>/dev/null || : * Mon May 26 2008 rodrigo@suse.de - Depend on alsa-plugins-pulse to have ALSA-based applications work out of the box with PulseAudio (bnc#394177) -* Sat May 24 2008 jpr@suse.de +* Fri May 23 2008 jpr@suse.de - Generate 32bit libraries (bnc #338269) * Mon May 19 2008 rodrigo@suse.de - Removed pulseaudio-use-correct-socket-for-esd-375701.patch, @@ -606,7 +611,7 @@ groupadd -r pulse-access &>/dev/null || : * Tue May 06 2008 rodrigo@suse.de - Added pulseaudio-use-correct-socket-for-esd-375701.patch to use correct esound socket (bnc375701) -* Thu Apr 10 2008 maw@suse.de +* Wed Apr 09 2008 maw@suse.de - Update to version 0.9.10: + Better compatibility in padsp with certain programs which like to pass NULL strings to libc functions @@ -677,7 +682,7 @@ groupadd -r pulse-access &>/dev/null || : - Removed 'rm -rf $RPM_BUILD_ROOT' from %%install * Mon Dec 24 2007 rodrigo@suse.de - Use /var/lib/pulseaudio as home dir for pulseaudio user. -* Wed Dec 12 2007 rodrigo@suse.de +* Tue Dec 11 2007 rodrigo@suse.de - Removed special permissions for pulseaudio binary to make it buildable until the permissions thing is solved. * Tue Dec 11 2007 rodrigo@suse.de @@ -736,7 +741,7 @@ groupadd -r pulse-access &>/dev/null || : - fix suspend/resume with alsa backend - fix the frame size handling in alsa backend - fix possible NULL dereference -* Mon Oct 16 2006 schwab@suse.de +* Sun Oct 15 2006 schwab@suse.de - Make sure config.rpath is present. * Wed Sep 06 2006 tiwai@suse.de - updated to version 0.9.5: