summaryrefslogtreecommitdiff
path: root/src/modules/module-esound-sink.c
diff options
context:
space:
mode:
authorTanu Kaskinen <tanuk@iki.fi>2012-08-30 16:50:13 +0300
committerArun Raghavan <arun.raghavan@collabora.co.uk>2012-11-16 23:16:05 +0530
commit29f064aa3d3a83e275361aad3f9e7efdc84b8ad0 (patch)
tree414fea43b6da17ba94b7d37020702aedf30168cc /src/modules/module-esound-sink.c
parentcd1102cce01e47645ed03ddf46a0a8b80d65fc9e (diff)
sink: Process rewind requests also when suspended.
When a rewind is requested on a sink input, the request parameters are stored in the pa_sink_input struct. The parameters are reset during rewind processing, and if the sink decides to ignore the rewind request due to being suspended, stale parameters are left in pa_sink_input. It's particularly problematic if the rewrite_bytes parameter is left at -1, because that will prevent all future rewind processing on that sink input. So, in order to avoid stale parameters, every rewind request needs to be processed, even if the sink is suspended. Reported-by: Uoti Urpala
Diffstat (limited to 'src/modules/module-esound-sink.c')
-rw-r--r--src/modules/module-esound-sink.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/modules/module-esound-sink.c b/src/modules/module-esound-sink.c
index 08387163a..54fed658c 100644
--- a/src/modules/module-esound-sink.c
+++ b/src/modules/module-esound-sink.c
@@ -213,9 +213,8 @@ static void thread_func(void *userdata) {
for (;;) {
int ret;
- if (PA_SINK_IS_OPENED(u->sink->thread_info.state))
- if (u->sink->thread_info.rewind_requested)
- pa_sink_process_rewind(u->sink, 0);
+ if (u->sink->thread_info.rewind_requested)
+ pa_sink_process_rewind(u->sink, 0);
if (u->rtpoll_item) {
struct pollfd *pollfd;