[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.15-112-g0921b1b
Lennart Poettering
gitmailer-noreply at 0pointer.de
Thu May 14 10:51:09 PDT 2009
This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.
The master branch has been updated
from 234c61b638a3de248df3a0f0f0930c92325d53b5 (commit)
- Log -----------------------------------------------------------------
0921b1b shm: rework alignment when punching memory
763954c upnp: convert all property names to CamelCase to follow D-Bus spec
1a39acc rescue: make we don't end up in an endless loop when we can't move a sink input
-----------------------------------------------------------------------
Summary of changes:
src/modules/module-rescue-streams.c | 38 +++++++++++---------
src/modules/module-rygel-media-server.c | 58 +++++++++++++++---------------
src/pulsecore/shm.c | 44 ++++++++++++++---------
3 files changed, 76 insertions(+), 64 deletions(-)
-----------------------------------------------------------------------
commit 1a39acce41e1725867458b69ca7844e75b62431c
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu May 14 03:52:13 2009 +0200
rescue: make we don't end up in an endless loop when we can't move a sink input
diff --git a/src/modules/module-rescue-streams.c b/src/modules/module-rescue-streams.c
index 7c99a9b..c22711a 100644
--- a/src/modules/module-rescue-streams.c
+++ b/src/modules/module-rescue-streams.c
@@ -31,6 +31,7 @@
#include <pulsecore/modargs.h>
#include <pulsecore/log.h>
#include <pulsecore/namereg.h>
+#include <pulsecore/core-util.h>
#include "module-rescue-streams-symdef.h"
@@ -49,6 +50,7 @@ struct userdata {
static pa_hook_result_t sink_hook_callback(pa_core *c, pa_sink *sink, void* userdata) {
pa_sink_input *i;
+ uint32_t idx;
pa_sink *target;
pa_assert(c);
@@ -58,15 +60,14 @@ static pa_hook_result_t sink_hook_callback(pa_core *c, pa_sink *sink, void* user
if (c->state == PA_CORE_SHUTDOWN)
return PA_HOOK_OK;
- if (!pa_idxset_size(sink->inputs)) {
+ if (pa_idxset_size(sink->inputs) <= 0) {
pa_log_debug("No sink inputs to move away.");
return PA_HOOK_OK;
}
if (!(target = pa_namereg_get(c, NULL, PA_NAMEREG_SINK)) || target == sink) {
- uint32_t idx;
- for (target = pa_idxset_first(c->sinks, &idx); target; target = pa_idxset_next(c->sinks, &idx))
+ PA_IDXSET_FOREACH(target, c->sinks, idx)
if (target != sink)
break;
@@ -76,20 +77,24 @@ static pa_hook_result_t sink_hook_callback(pa_core *c, pa_sink *sink, void* user
}
}
- while ((i = pa_idxset_first(sink->inputs, NULL))) {
+ pa_assert(target != sink);
+
+ PA_IDXSET_FOREACH(i, sink->inputs, idx) {
if (pa_sink_input_move_to(i, target, FALSE) < 0)
- pa_log_warn("Failed to move sink input %u \"%s\" to %s.", i->index, pa_proplist_gets(i->proplist, PA_PROP_APPLICATION_NAME), target->name);
+ pa_log_info("Failed to move sink input %u \"%s\" to %s.", i->index,
+ pa_strnull(pa_proplist_gets(i->proplist, PA_PROP_APPLICATION_NAME)), target->name);
else
- pa_log_info("Sucessfully moved sink input %u \"%s\" to %s.", i->index, pa_proplist_gets(i->proplist, PA_PROP_APPLICATION_NAME), target->name);
+ pa_log_info("Sucessfully moved sink input %u \"%s\" to %s.", i->index,
+ pa_strnull(pa_proplist_gets(i->proplist, PA_PROP_APPLICATION_NAME)), target->name);
}
-
return PA_HOOK_OK;
}
static pa_hook_result_t source_hook_callback(pa_core *c, pa_source *source, void* userdata) {
pa_source_output *o;
pa_source *target;
+ uint32_t idx;
pa_assert(c);
pa_assert(source);
@@ -98,15 +103,14 @@ static pa_hook_result_t source_hook_callback(pa_core *c, pa_source *source, void
if (c->state == PA_CORE_SHUTDOWN)
return PA_HOOK_OK;
- if (!pa_idxset_size(source->outputs)) {
+ if (pa_idxset_size(source->outputs) <= 0) {
pa_log_debug("No source outputs to move away.");
return PA_HOOK_OK;
}
if (!(target = pa_namereg_get(c, NULL, PA_NAMEREG_SOURCE)) || target == source) {
- uint32_t idx;
- for (target = pa_idxset_first(c->sources, &idx); target; target = pa_idxset_next(c->sources, &idx))
+ PA_IDXSET_FOREACH(target, c->sources, idx)
if (target != source && !target->monitor_of == !source->monitor_of)
break;
@@ -118,19 +122,20 @@ static pa_hook_result_t source_hook_callback(pa_core *c, pa_source *source, void
pa_assert(target != source);
- while ((o = pa_idxset_first(source->outputs, NULL))) {
+ PA_IDXSET_FOREACH(o, source->outputs, idx) {
if (pa_source_output_move_to(o, target, FALSE) < 0)
- pa_log_warn("Failed to move source output %u \"%s\" to %s.", o->index, pa_proplist_gets(o->proplist, PA_PROP_APPLICATION_NAME), target->name);
+ pa_log_info("Failed to move source output %u \"%s\" to %s.", o->index,
+ pa_strnull(pa_proplist_gets(o->proplist, PA_PROP_APPLICATION_NAME)), target->name);
else
- pa_log_info("Sucessfully moved source output %u \"%s\" to %s.", o->index, pa_proplist_gets(o->proplist, PA_PROP_APPLICATION_NAME), target->name);
+ pa_log_info("Sucessfully moved source output %u \"%s\" to %s.", o->index,
+ pa_strnull(pa_proplist_gets(o->proplist, PA_PROP_APPLICATION_NAME)), target->name);
}
-
return PA_HOOK_OK;
}
int pa__init(pa_module*m) {
- pa_modargs *ma = NULL;
+ pa_modargs *ma;
struct userdata *u;
pa_assert(m);
@@ -153,10 +158,9 @@ void pa__done(pa_module*m) {
pa_assert(m);
- if (!m->userdata)
+ if (!(u = m->userdata))
return;
- u = m->userdata;
if (u->sink_slot)
pa_hook_slot_free(u->sink_slot);
if (u->source_slot)
commit 763954c467d3f8f9ec1d454b7292d3f1bc155c59
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu May 14 19:50:36 2009 +0200
upnp: convert all property names to CamelCase to follow D-Bus spec
diff --git a/src/modules/module-rygel-media-server.c b/src/modules/module-rygel-media-server.c
index 96c1b41..2c0de58 100644
--- a/src/modules/module-rygel-media-server.c
+++ b/src/modules/module-rygel-media-server.c
@@ -82,12 +82,12 @@ PA_MODULE_USAGE(
" <signal name=\"Updated\">" \
" <arg name=\"path\" type=\"o\"/>" \
" </signal>" \
- " <property name=\"item-count\" type=\"u\" access=\"read\"/>" \
- " <property name=\"container-count\" type=\"u\" access=\"read\"/>" \
+ " <property name=\"ItemCount\" type=\"u\" access=\"read\"/>" \
+ " <property name=\"ContainerCount\" type=\"u\" access=\"read\"/>" \
" </interface>" \
" <interface name=\"org.Rygel.MediaObject1\">" \
- " <property name=\"icon-name\" type=\"s\" access=\"read\"/>" \
- " <property name=\"display-name\" type=\"s\" access=\"read\"/>" \
+ " <property name=\"IconName\" type=\"s\" access=\"read\"/>" \
+ " <property name=\"DisplayName\" type=\"s\" access=\"read\"/>" \
" </interface>" \
" <interface name=\"org.freedesktop.DBus.Properties\">" \
" <method name=\"Get\">" \
@@ -121,12 +121,12 @@ PA_MODULE_USAGE(
" <!-- If you are looking for documentation make sure to check out" \
" http://live.gnome.org/Rygel/MediaProviderSpec -->" \
" <interface name=\"org.Rygel.MediaItem1\">" \
- " <property name=\"urls\" type=\"as\" access=\"read\"/>" \
- " <property name=\"mime-type\" type=\"s\" access=\"read\"/>" \
- " <property name=\"type\" type=\"s\" access=\"read\"/>" \
+ " <property name=\"Urls\" type=\"as\" access=\"read\"/>" \
+ " <property name=\"MimeType\" type=\"s\" access=\"read\"/>" \
+ " <property name=\"Type\" type=\"s\" access=\"read\"/>" \
" </interface>" \
" <interface name=\"org.Rygel.MediaObject1\">" \
- " <property name=\"display-name\" type=\"s\" access=\"read\"/>" \
+ " <property name=\"DisplayName\" type=\"s\" access=\"read\"/>" \
" </interface>" \
" <interface name=\"org.freedesktop.DBus.Properties\">" \
" <method name=\"Get\">" \
@@ -313,11 +313,11 @@ static DBusHandlerResult root_handler(DBusConnection *c, DBusMessage *m, void *u
DBUS_TYPE_ARRAY, DBUS_TYPE_OBJECT_PATH, &parray, 0,
DBUS_TYPE_INVALID));
- } else if (message_is_property_get(m, "org.Rygel.MediaObject1", "display-name")) {
+ } else if (message_is_property_get(m, "org.Rygel.MediaObject1", "DisplayName")) {
pa_assert_se(r = dbus_message_new_method_return(m));
append_variant_string(r, NULL, u->display_name);
- } else if (message_is_property_get(m, "org.Rygel.MediaObject1", "icon-name")) {
+ } else if (message_is_property_get(m, "org.Rygel.MediaObject1", "IconName")) {
pa_assert_se(r = dbus_message_new_method_return(m));
append_variant_string(r, NULL, "audio-card");
@@ -328,15 +328,15 @@ static DBusHandlerResult root_handler(DBusConnection *c, DBusMessage *m, void *u
dbus_message_iter_init_append(r, &iter);
pa_assert_se(dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "{sv}", &sub));
- append_property_dict_entry_string(r, &sub, "display-name", u->display_name);
- append_property_dict_entry_string(r, &sub, "icon-name", "audio-card");
+ append_property_dict_entry_string(r, &sub, "DisplayName", u->display_name);
+ append_property_dict_entry_string(r, &sub, "IconName", "audio-card");
pa_assert_se(dbus_message_iter_close_container(&iter, &sub));
- } else if (message_is_property_get(m, "org.Rygel.MediaContainer1", "item-count")) {
+ } else if (message_is_property_get(m, "org.Rygel.MediaContainer1", "ItemCount")) {
pa_assert_se(r = dbus_message_new_method_return(m));
append_variant_unsigned(r, NULL, 0);
- } else if (message_is_property_get(m, "org.Rygel.MediaContainer1", "container-count")) {
+ } else if (message_is_property_get(m, "org.Rygel.MediaContainer1", "ContainerCount")) {
pa_assert_se(r = dbus_message_new_method_return(m));
append_variant_unsigned(r, NULL, 2);
@@ -347,8 +347,8 @@ static DBusHandlerResult root_handler(DBusConnection *c, DBusMessage *m, void *u
dbus_message_iter_init_append(r, &iter);
pa_assert_se(dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "{sv}", &sub));
- append_property_dict_entry_unsigned(r, &sub, "item-count", 0);
- append_property_dict_entry_unsigned(r, &sub, "container-count", 2);
+ append_property_dict_entry_unsigned(r, &sub, "ItemCount", 0);
+ append_property_dict_entry_unsigned(r, &sub, "ContainerCount", 2);
pa_assert_se(dbus_message_iter_close_container(&iter, &sub));
} else if (dbus_message_is_method_call(m, "org.freedesktop.DBus.Introspectable", "Introspect")) {
@@ -470,7 +470,7 @@ static DBusHandlerResult sinks_and_sources_handler(DBusConnection *c, DBusMessag
pa_xfree(array);
- } else if (message_is_property_get(m, "org.Rygel.MediaObject1", "display-name")) {
+ } else if (message_is_property_get(m, "org.Rygel.MediaObject1", "DisplayName")) {
pa_assert_se(r = dbus_message_new_method_return(m));
@@ -488,13 +488,13 @@ static DBusHandlerResult sinks_and_sources_handler(DBusConnection *c, DBusMessag
dbus_message_iter_init_append(r, &iter);
pa_assert_se(dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "{sv}", &sub));
- append_property_dict_entry_string(m, &sub, "display-name",
+ append_property_dict_entry_string(m, &sub, "DisplayName",
pa_streq(path, OBJECT_SINKS) ?
_("Output Devices") :
_("Input Devices"));
pa_assert_se(dbus_message_iter_close_container(&iter, &sub));
- } else if (message_is_property_get(m, "org.Rygel.MediaContainer1", "item-count")) {
+ } else if (message_is_property_get(m, "org.Rygel.MediaContainer1", "ItemCount")) {
pa_assert_se(r = dbus_message_new_method_return(m));
append_variant_unsigned(r, NULL,
@@ -502,7 +502,7 @@ static DBusHandlerResult sinks_and_sources_handler(DBusConnection *c, DBusMessag
pa_idxset_size(u->core->sinks) :
pa_idxset_size(u->core->sources));
- } else if (message_is_property_get(m, "org.Rygel.MediaContainer1", "container-count")) {
+ } else if (message_is_property_get(m, "org.Rygel.MediaContainer1", "ContainerCount")) {
pa_assert_se(r = dbus_message_new_method_return(m));
append_variant_unsigned(r, NULL, 0);
@@ -513,11 +513,11 @@ static DBusHandlerResult sinks_and_sources_handler(DBusConnection *c, DBusMessag
dbus_message_iter_init_append(r, &iter);
pa_assert_se(dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "{sv}", &sub));
- append_property_dict_entry_unsigned(r, &sub, "item-count",
+ append_property_dict_entry_unsigned(r, &sub, "ItemCount",
pa_streq(path, OBJECT_SINKS) ?
pa_idxset_size(u->core->sinks) :
pa_idxset_size(u->core->sources));
- append_property_dict_entry_unsigned(r, &sub, "container-count", 0);
+ append_property_dict_entry_unsigned(r, &sub, "ContainerCount", 0);
pa_assert_se(dbus_message_iter_close_container(&iter, &sub));
} else if (dbus_message_is_method_call(m, "org.freedesktop.DBus.Introspectable", "Introspect")) {
pa_strbuf *sb;
@@ -567,15 +567,15 @@ static DBusHandlerResult sinks_and_sources_handler(DBusConnection *c, DBusMessag
if (!sink && !source)
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
- if (message_is_property_get(m, "org.Rygel.MediaObject1", "display-name")) {
+ if (message_is_property_get(m, "org.Rygel.MediaObject1", "DisplayName")) {
pa_assert_se(r = dbus_message_new_method_return(m));
append_variant_string(r, NULL, pa_strna(pa_proplist_gets(sink ? sink->proplist : source->proplist, PA_PROP_DEVICE_DESCRIPTION)));
- } else if (message_is_property_get(m, "org.Rygel.MediaItem1", "type")) {
+ } else if (message_is_property_get(m, "org.Rygel.MediaItem1", "Type")) {
pa_assert_se(r = dbus_message_new_method_return(m));
append_variant_string(r, NULL, "audio");
- } else if (message_is_property_get(m, "org.Rygel.MediaItem1", "mime-type")) {
+ } else if (message_is_property_get(m, "org.Rygel.MediaItem1", "MimeType")) {
char *t;
if (sink)
@@ -587,7 +587,7 @@ static DBusHandlerResult sinks_and_sources_handler(DBusConnection *c, DBusMessag
append_variant_string(r, NULL, t);
pa_xfree(t);
- } else if (message_is_property_get(m, "org.Rygel.MediaItem1", "urls")) {
+ } else if (message_is_property_get(m, "org.Rygel.MediaItem1", "Urls")) {
DBusMessageIter iter, sub, array;
char *url;
@@ -612,7 +612,7 @@ static DBusHandlerResult sinks_and_sources_handler(DBusConnection *c, DBusMessag
dbus_message_iter_init_append(r, &iter);
pa_assert_se(dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "{sv}", &sub));
- append_property_dict_entry_string(r, &sub, "display-name", pa_strna(pa_proplist_gets(sink ? sink->proplist : source->proplist, PA_PROP_DEVICE_DESCRIPTION)));
+ append_property_dict_entry_string(r, &sub, "DisplayName", pa_strna(pa_proplist_gets(sink ? sink->proplist : source->proplist, PA_PROP_DEVICE_DESCRIPTION)));
pa_assert_se(dbus_message_iter_close_container(&iter, &sub));
} else if (message_is_property_get_all(m, "org.Rygel.MediaItem1")) {
@@ -624,14 +624,14 @@ static DBusHandlerResult sinks_and_sources_handler(DBusConnection *c, DBusMessag
dbus_message_iter_init_append(r, &iter);
pa_assert_se(dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "{sv}", &sub));
- append_property_dict_entry_string(r, &sub, "type", "audio");
+ append_property_dict_entry_string(r, &sub, "Type", "audio");
if (sink)
t = pa_sample_spec_to_mime_type_mimefy(&sink->sample_spec, &sink->channel_map);
else
t = pa_sample_spec_to_mime_type_mimefy(&source->sample_spec, &source->channel_map);
- append_property_dict_entry_string(r, &sub, "mime-type", t);
+ append_property_dict_entry_string(r, &sub, "MimeType", t);
pa_xfree(t);
pa_assert_se(dbus_message_iter_open_container(&sub, DBUS_TYPE_DICT_ENTRY, NULL, &dict));
commit 0921b1b4a30cb21da0009e07a4b18c5443e60001
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu May 14 19:51:05 2009 +0200
shm: rework alignment when punching memory
diff --git a/src/pulsecore/shm.c b/src/pulsecore/shm.c
index 5b9e960..fab2b3b 100644
--- a/src/pulsecore/shm.c
+++ b/src/pulsecore/shm.c
@@ -69,7 +69,10 @@
#define SHM_MARKER ((int) 0xbeefcafe)
/* We now put this SHM marker at the end of each segment. It's
- * optional, to not require a reboot when upgrading, though */
+ * optional, to not require a reboot when upgrading, though. Note that
+ * on multiarch systems 32bit and 64bit processes might access this
+ * region simultaneously. The header fields need to be independant
+ * from the process' word with */
struct shm_marker {
pa_atomic_t marker; /* 0xbeefcafe */
pa_atomic_t pid;
@@ -79,6 +82,8 @@ struct shm_marker {
uint64_t _reserved4;
} PA_GCC_PACKED;
+#define SHM_MARKER_SIZE PA_ALIGN(sizeof(struct shm_marker))
+
static char *segment_name(char *fn, size_t l, unsigned id) {
pa_snprintf(fn, l, "/pulse-shm-%u", id);
return fn;
@@ -97,15 +102,15 @@ int pa_shm_create_rw(pa_shm *m, size_t size, pa_bool_t shared, mode_t mode) {
* ones */
pa_shm_cleanup();
- /* Round up to make it aligned */
- size = PA_ALIGN(size);
+ /* Round up to make it page aligned */
+ size = PA_PAGE_ALIGN(size);
if (!shared) {
m->id = 0;
m->size = size;
#ifdef MAP_ANONYMOUS
- if ((m->ptr = mmap(NULL, PA_PAGE_ALIGN(m->size), PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, (off_t) 0)) == MAP_FAILED) {
+ if ((m->ptr = mmap(NULL, m->size, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, (off_t) 0)) == MAP_FAILED) {
pa_log("mmap() failed: %s", pa_cstrerror(errno));
goto fail;
}
@@ -136,7 +141,7 @@ int pa_shm_create_rw(pa_shm *m, size_t size, pa_bool_t shared, mode_t mode) {
goto fail;
}
- m->size = size + PA_ALIGN(sizeof(struct shm_marker));
+ m->size = size + SHM_MARKER_SIZE;
if (ftruncate(fd, (off_t) m->size) < 0) {
pa_log("ftruncate() failed: %s", pa_cstrerror(errno));
@@ -150,7 +155,7 @@ int pa_shm_create_rw(pa_shm *m, size_t size, pa_bool_t shared, mode_t mode) {
/* We store our PID at the end of the shm block, so that we
* can check for dead shm segments later */
- marker = (struct shm_marker*) ((uint8_t*) m->ptr + m->size - PA_ALIGN(sizeof(struct shm_marker)));
+ marker = (struct shm_marker*) ((uint8_t*) m->ptr + m->size - SHM_MARKER_SIZE);
pa_atomic_store(&marker->pid, (int) getpid());
pa_atomic_store(&marker->marker, SHM_MARKER);
@@ -197,7 +202,7 @@ void pa_shm_free(pa_shm *m) {
#endif
} else {
#ifdef HAVE_SHM_OPEN
- if (munmap(m->ptr, m->size) < 0)
+ if (munmap(m->ptr, PA_PAGE_ALIGN(m->size)) < 0)
pa_log("munmap() failed: %s", pa_cstrerror(errno));
if (m->do_unlink) {
@@ -214,12 +219,12 @@ void pa_shm_free(pa_shm *m) {
#endif
}
- memset(m, 0, sizeof(*m));
+ pa_zero(*m);
}
void pa_shm_punch(pa_shm *m, size_t offset, size_t size) {
void *ptr;
- size_t o, ps;
+ size_t o;
pa_assert(m);
pa_assert(m->ptr);
@@ -233,16 +238,19 @@ void pa_shm_punch(pa_shm *m, size_t offset, size_t size) {
/* You're welcome to implement this as NOOP on systems that don't
* support it */
- /* Align this to multiples of the page size */
+ /* Align the pointer up to multiples of the page size */
ptr = (uint8_t*) m->ptr + offset;
o = (size_t) ((uint8_t*) ptr - (uint8_t*) PA_PAGE_ALIGN_PTR(ptr));
if (o > 0) {
- ps = PA_PAGE_SIZE;
- ptr = (uint8_t*) ptr + (ps - o);
- size -= ps - o;
+ size_t delta = PA_PAGE_SIZE - o;
+ ptr = (uint8_t*) ptr + delta;
+ size -= delta;
}
+ /* Align the size down to multiples of page size */
+ size = (size / PA_PAGE_SIZE) * PA_PAGE_SIZE;
+
#ifdef MADV_REMOVE
if (madvise(ptr, size, MADV_REMOVE) >= 0)
return;
@@ -254,9 +262,9 @@ void pa_shm_punch(pa_shm *m, size_t offset, size_t size) {
#endif
#ifdef MADV_DONTNEED
- pa_assert_se(madvise(ptr, size, MADV_DONTNEED) == 0);
+ madvise(ptr, size, MADV_DONTNEED);
#elif defined(POSIX_MADV_DONTNEED)
- pa_assert_se(posix_madvise(ptr, size, POSIX_MADV_DONTNEED) == 0);
+ posix_madvise(ptr, size, POSIX_MADV_DONTNEED);
#endif
}
@@ -283,7 +291,7 @@ int pa_shm_attach_ro(pa_shm *m, unsigned id) {
}
if (st.st_size <= 0 ||
- st.st_size > (off_t) (MAX_SHM_SIZE+PA_ALIGN(sizeof(struct shm_marker))) ||
+ st.st_size > (off_t) (MAX_SHM_SIZE+SHM_MARKER_SIZE) ||
PA_ALIGN((size_t) st.st_size) != (size_t) st.st_size) {
pa_log("Invalid shared memory segment size");
goto fail;
@@ -346,12 +354,12 @@ int pa_shm_cleanup(void) {
if (pa_shm_attach_ro(&seg, id) < 0)
continue;
- if (seg.size < PA_ALIGN(sizeof(struct shm_marker))) {
+ if (seg.size < SHM_MARKER_SIZE) {
pa_shm_free(&seg);
continue;
}
- m = (struct shm_marker*) ((uint8_t*) seg.ptr + seg.size - PA_ALIGN(sizeof(struct shm_marker)));
+ m = (struct shm_marker*) ((uint8_t*) seg.ptr + seg.size - SHM_MARKER_SIZE);
if (pa_atomic_load(&m->marker) != SHM_MARKER) {
pa_shm_free(&seg);
--
hooks/post-receive
PulseAudio Sound Server
More information about the pulseaudio-commits
mailing list