[pulseaudio-commits] r2481 - /branches/coling/airtunes/src/modules/module-raop-sink.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Mon May 26 14:04:46 PDT 2008
Author: coling
Date: Mon May 26 23:04:45 2008
New Revision: 2481
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2481&root=pulseaudio&view=rev
Log:
Move the encoding loop around a bit such that it does not grab the data and keep it for the next loop iteration.
Modified:
branches/coling/airtunes/src/modules/module-raop-sink.c
Modified: branches/coling/airtunes/src/modules/module-raop-sink.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/coling/airtunes/src/modules/module-raop-sink.c?rev=2481&root=pulseaudio&r1=2480&r2=2481&view=diff
==============================================================================
--- branches/coling/airtunes/src/modules/module-raop-sink.c (original)
+++ branches/coling/airtunes/src/modules/module-raop-sink.c Mon May 26 23:04:45 2008
@@ -216,17 +216,19 @@
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->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;
More information about the pulseaudio-commits
mailing list