diff options
author | Lennart Poettering <lennart@poettering.net> | 2007-09-24 17:14:00 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2007-09-24 17:14:00 +0000 |
commit | ef020c6e8918c0481451e5640e95faf56ed453a5 (patch) | |
tree | 6169f3bacf28a0c81ec791f967d5903c0e52fc44 | |
parent | 55651ec215b8359aaf3668cc37eb270847563cc3 (diff) |
fix stream corking: ignore pa_sink_input() when we are in corked state
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1896 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r-- | src/pulsecore/sink-input.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c index 9360bee0..4a9ba6af 100644 --- a/src/pulsecore/sink-input.c +++ b/src/pulsecore/sink-input.c @@ -397,7 +397,7 @@ int pa_sink_input_peek(pa_sink_input *i, size_t length, pa_memchunk *chunk, pa_c pa_assert(chunk); pa_assert(volume); - if (!i->peek || !i->drop || i->thread_info.state == PA_SINK_INPUT_UNLINKED || i->thread_info.state == PA_SINK_INPUT_CORKED) + if (!i->peek || !i->drop || i->thread_info.state == PA_SINK_INPUT_CORKED) goto finish; pa_assert(i->thread_info.state == PA_SINK_INPUT_RUNNING || i->thread_info.state == PA_SINK_INPUT_DRAINED); @@ -518,6 +518,9 @@ void pa_sink_input_drop(pa_sink_input *i, size_t length) { pa_assert(pa_frame_aligned(length, &i->sink->sample_spec)); pa_assert(length > 0); + if (!i->peek || !i->drop || i->thread_info.state == PA_SINK_INPUT_CORKED) + return; + if (i->thread_info.move_silence > 0) { if (i->thread_info.move_silence >= length) { |