projects
/
platform
/
upstream
/
pulseaudio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3767cdb
)
Move the encoding loop around a bit such that it does not grab the data and keep...
author
Colin Guthrie
<pulse@colin.guthr.ie>
Mon, 26 May 2008 21:04:45 +0000
(21:04 +0000)
committer
Colin Guthrie
<pulse@colin.guthr.ie>
Wed, 8 Oct 2008 19:32:08 +0000
(20:32 +0100)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/coling@2481
fefdeb5f
-60dc-0310-8127-
8f9354f1896f
src/modules/module-raop-sink.c
patch
|
blob
|
history
diff --git
a/src/modules/module-raop-sink.c
b/src/modules/module-raop-sink.c
index
79c517a
..
e17198c
100644
(file)
--- a/
src/modules/module-raop-sink.c
+++ b/
src/modules/module-raop-sink.c
@@
-216,17
+216,19
@@
static void thread_func(void *userdata) {
ssize_t l;
void *p;
ssize_t l;
void *p;
- if (u->raw_memchunk.length <= 0) {
- if (u->raw_memchunk.memblock)
- pa_memblock_unref(u->raw_memchunk.memblock);
- pa_memchunk_reset(&u->raw_memchunk);
-
- /* Grab unencoded data */
- pa_sink_render(u->sink, u->block_size, &u->raw_memchunk);
- }
- pa_assert(u->raw_memchunk.length > 0);
-
if (u->encoded_memchunk.length <= 0) {
if (u->encoded_memchunk.length <= 0) {
+ if (u->raw_memchunk.length <= 0) {
+ if (u->raw_memchunk.memblock)
+ pa_memblock_unref(u->raw_memchunk.memblock);
+ pa_memchunk_reset(&u->raw_memchunk);
+
+ /* Grab unencoded data */
+ pa_sink_render(u->sink, u->block_size, &u->raw_memchunk);
+ p = pa_memblock_acquire(u->raw_memchunk.memblock);
+ pa_memblock_release(u->raw_memchunk.memblock);
+ }
+ pa_assert(u->raw_memchunk.length > 0);
+
/* Encode it */
size_t rl = u->raw_memchunk.length;
u->encoding_overhead += u->next_encoding_overhead;
/* Encode it */
size_t rl = u->raw_memchunk.length;
u->encoding_overhead += u->next_encoding_overhead;