mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
add POSIX locking to authkey.c
fix esound protocol cpu consumption when finishing a stream git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@242 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
949014e154
commit
35148d8c05
4 changed files with 92 additions and 52 deletions
|
|
@ -872,7 +872,7 @@ static void do_work(struct connection *c) {
|
|||
|
||||
assert(c->protocol && c->protocol->core && c->protocol->core->mainloop && c->protocol->core->mainloop->defer_enable);
|
||||
c->protocol->core->mainloop->defer_enable(c->defer_event, 0);
|
||||
|
||||
|
||||
if (c->dead)
|
||||
return;
|
||||
|
||||
|
|
@ -891,6 +891,7 @@ fail:
|
|||
if (c->state == ESD_STREAMING_DATA && c->sink_input) {
|
||||
c->dead = 1;
|
||||
pa_memblockq_prebuf_disable(c->input_memblockq);
|
||||
c->protocol->core->mainloop->defer_enable(c->defer_event, 0);
|
||||
} else
|
||||
connection_free(c);
|
||||
}
|
||||
|
|
@ -937,7 +938,9 @@ static void sink_input_drop_cb(struct pa_sink_input *i, const struct pa_memchunk
|
|||
|
||||
/* do something */
|
||||
assert(c->protocol && c->protocol->core && c->protocol->core->mainloop && c->protocol->core->mainloop->defer_enable);
|
||||
c->protocol->core->mainloop->defer_enable(c->defer_event, 1);
|
||||
|
||||
if (!c->dead)
|
||||
c->protocol->core->mainloop->defer_enable(c->defer_event, 1);
|
||||
|
||||
/* assert(pa_memblockq_get_length(c->input_memblockq) > 2048); */
|
||||
}
|
||||
|
|
@ -963,7 +966,9 @@ static void source_output_push_cb(struct pa_source_output *o, const struct pa_me
|
|||
|
||||
/* do something */
|
||||
assert(c->protocol && c->protocol->core && c->protocol->core->mainloop && c->protocol->core->mainloop->defer_enable);
|
||||
c->protocol->core->mainloop->defer_enable(c->defer_event, 1);
|
||||
|
||||
if (!c->dead)
|
||||
c->protocol->core->mainloop->defer_enable(c->defer_event, 1);
|
||||
}
|
||||
|
||||
static void source_output_kill_cb(struct pa_source_output *o) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue