]> code.delx.au - pulseaudio/blobdiff - src/modules/module-pipe-sink.c
make sure to call process_rewind() under all circumstances before we do the next...
[pulseaudio] / src / modules / module-pipe-sink.c
index cd25b890012d664ea233a79832f003f64b4ba7b3..0999935ba677352d83496f78e7f1068ca9fee5dc 100644 (file)
@@ -184,8 +184,12 @@ static void thread_func(void *userdata) {
         /* Render some data and write it to the fifo */
         if (u->sink->thread_info.state == PA_SINK_RUNNING) {
 
-            if (u->sink->thread_info.rewind_nbytes > 0)
-                process_rewind(u);
+            if (u->sink->thread_info.rewind_requested) {
+                if (u->sink->thread_info.rewind_nbytes > 0)
+                    process_rewind(u);
+                else
+                    pa_sink_process_rewind(u->sink, 0);
+            }
 
             if (pollfd->revents) {
                 if (process_render(u) < 0)