[pulseaudio-commits] src/modules

Tanu Kaskinen tanuk at kemper.freedesktop.org
Sun Jul 14 03:44:08 PDT 2013


 src/modules/module-tunnel.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 705d3c28f215bd6899e0e5c3a5ed9a69418afd86
Author: Tanu Kaskinen <tanu.kaskinen at linux.intel.com>
Date:   Sun Jul 14 13:39:32 2013 +0300

    tunnel: Fix reading state from wrong variable
    
    u->sink->state is not yet updated, so the state must be read from
    u->sink->thread_info.state. This makes pausing and resuming of the
    smoother happen at the right time.
    
    Thanks to Pierre Ossman for the patch.

diff --git a/src/modules/module-tunnel.c b/src/modules/module-tunnel.c
index de60573..ad45f73 100644
--- a/src/modules/module-tunnel.c
+++ b/src/modules/module-tunnel.c
@@ -488,9 +488,9 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
             /* First, change the state, because otherwise pa_sink_render() would fail */
             if ((r = pa_sink_process_msg(o, code, data, offset, chunk)) >= 0) {
 
-                stream_cork_within_thread(u, u->sink->state == PA_SINK_SUSPENDED);
+                stream_cork_within_thread(u, u->sink->thread_info.state == PA_SINK_SUSPENDED);
 
-                if (PA_SINK_IS_OPENED(u->sink->state))
+                if (PA_SINK_IS_OPENED(u->sink->thread_info.state))
                     send_data(u);
             }
 
@@ -597,7 +597,7 @@ static int source_process_msg(pa_msgobject *o, int code, void *data, int64_t off
             int r;
 
             if ((r = pa_source_process_msg(o, code, data, offset, chunk)) >= 0)
-                stream_cork_within_thread(u, u->source->state == PA_SOURCE_SUSPENDED);
+                stream_cork_within_thread(u, u->source->thread_info.state == PA_SOURCE_SUSPENDED);
 
             return r;
         }



More information about the pulseaudio-commits mailing list