summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/pstream.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-02-18 21:55:55 +0100
committerLennart Poettering <lennart@poettering.net>2009-02-18 21:55:55 +0100
commitbe81a681ac84ac56208c3bb315e04d04c2e53606 (patch)
treeda5dfb6741f910b0b846638754f6391b29fd29b8 /src/pulsecore/pstream.c
parent1737a19c86d34d1a3721d019f649beaa9aea02b3 (diff)
if we fail to import a memblock fill in silence to guarantee stability of timing
Diffstat (limited to 'src/pulsecore/pstream.c')
-rw-r--r--src/pulsecore/pstream.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/pulsecore/pstream.c b/src/pulsecore/pstream.c
index 7ff8edc9..ef1105ba 100644
--- a/src/pulsecore/pstream.c
+++ b/src/pulsecore/pstream.c
@@ -832,8 +832,8 @@ static int do_read(pa_pstream *p) {
ntohl(p->read.shm_info[PA_PSTREAM_SHM_INDEX]),
ntohl(p->read.shm_info[PA_PSTREAM_SHM_LENGTH])))) {
- pa_log_warn("Failed to import memory block.");
- return -1;
+ if (pa_log_ratelimit())
+ pa_log_debug("Failed to import memory block.");
}
if (p->recieve_memblock_callback) {
@@ -842,7 +842,7 @@ static int do_read(pa_pstream *p) {
chunk.memblock = b;
chunk.index = 0;
- chunk.length = pa_memblock_get_length(b);
+ chunk.length = b ? pa_memblock_get_length(b) : ntohl(p->read.shm_info[PA_PSTREAM_SHM_LENGTH]);
offset = (int64_t) (
(((uint64_t) ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI])) << 32) |
@@ -857,7 +857,8 @@ static int do_read(pa_pstream *p) {
p->recieve_memblock_callback_userdata);
}
- pa_memblock_unref(b);
+ if (b)
+ pa_memblock_unref(b);
}
goto frame_done;