[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. 9f0afb391a0748b2e1e78d5b19f1af48a249a674

Lennart Poettering gitmailer-noreply at 0pointer.de
Thu Jun 26 10:43:49 PDT 2008


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  d08cac0f8545d493812f83111166458c6248dc45 (commit)

- Log -----------------------------------------------------------------
9f0afb3... always forward rewind requests to the sink, and don't abort on nbytes=0
-----------------------------------------------------------------------

Summary of changes:
 src/modules/module-ladspa-sink.c |    6 +++---
 src/modules/module-remap-sink.c  |    9 +++------
 2 files changed, 6 insertions(+), 9 deletions(-)

-----------------------------------------------------------------------

commit 9f0afb391a0748b2e1e78d5b19f1af48a249a674
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Jun 26 19:43:45 2008 +0200

    always forward rewind requests to the sink, and don't abort on nbytes=0

diff --git a/src/modules/module-ladspa-sink.c b/src/modules/module-ladspa-sink.c
index 3e0babf..eae8008 100644
--- a/src/modules/module-ladspa-sink.c
+++ b/src/modules/module-ladspa-sink.c
@@ -217,16 +217,16 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk
 /* Called from I/O thread context */
 static void sink_input_process_rewind_cb(pa_sink_input *i, size_t nbytes) {
     struct userdata *u;
+    size_t amount = 0;
 
     pa_sink_input_assert_ref(i);
     pa_assert_se(u = i->userdata);
-    pa_assert(nbytes > 0);
 
     if (!u->sink || !PA_SINK_IS_OPENED(u->sink->thread_info.state))
         return;
 
     if (u->sink->thread_info.rewind_nbytes > 0) {
-        size_t max_rewrite, amount;
+        size_t max_rewrite;
 
         max_rewrite = nbytes + pa_memblockq_get_length(u->memblockq);
         amount = PA_MIN(u->sink->thread_info.rewind_nbytes, max_rewrite);
@@ -236,7 +236,6 @@ static void sink_input_process_rewind_cb(pa_sink_input *i, size_t nbytes) {
             unsigned c;
 
             pa_memblockq_seek(u->memblockq, - (int64_t) amount, PA_SEEK_RELATIVE);
-            pa_sink_process_rewind(u->sink, amount);
 
             pa_log_debug("Resetting plugin");
 
@@ -250,6 +249,7 @@ static void sink_input_process_rewind_cb(pa_sink_input *i, size_t nbytes) {
         }
     }
 
+    pa_sink_process_rewind(u->sink, amount);
     pa_memblockq_rewind(u->memblockq, nbytes);
 }
 
diff --git a/src/modules/module-remap-sink.c b/src/modules/module-remap-sink.c
index c87b1ec..bd86f4d 100644
--- a/src/modules/module-remap-sink.c
+++ b/src/modules/module-remap-sink.c
@@ -152,24 +152,21 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk
 
 /* Called from I/O thread context */
 static void sink_input_process_rewind_cb(pa_sink_input *i, size_t nbytes) {
+    size_t amount = 0;
     struct userdata *u;
 
     pa_sink_input_assert_ref(i);
     pa_assert_se(u = i->userdata);
-    pa_assert(nbytes > 0);
 
     if (!u->sink || !PA_SINK_IS_OPENED(u->sink->thread_info.state))
         return;
 
     if (u->sink->thread_info.rewind_nbytes > 0) {
-        size_t amount;
-
         amount = PA_MIN(u->sink->thread_info.rewind_nbytes, nbytes);
         u->sink->thread_info.rewind_nbytes = 0;
-
-        if (amount > 0)
-            pa_sink_process_rewind(u->sink, amount);
     }
+
+    pa_sink_process_rewind(u->sink, amount);
 }
 
 /* Called from I/O thread context */

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list