mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-10 13:29:58 -05:00
reset prebuf if it is too large
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2548 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
038a033c78
commit
ba64de8f3c
1 changed files with 2 additions and 2 deletions
|
|
@ -812,7 +812,7 @@ static void fix_playback_buffer_attr_pre(playback_stream *s, pa_bool_t adjust_la
|
||||||
if (*tlength <= *minreq)
|
if (*tlength <= *minreq)
|
||||||
*tlength = *minreq*2 + frame_size;
|
*tlength = *minreq*2 + frame_size;
|
||||||
|
|
||||||
if (*prebuf <= 0)
|
if (*prebuf <= 0 || *prebuf > *tlength)
|
||||||
*prebuf = *tlength;
|
*prebuf = *tlength;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1290,7 +1290,7 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk
|
||||||
|
|
||||||
if (pa_memblockq_peek(s->memblockq, chunk) < 0) {
|
if (pa_memblockq_peek(s->memblockq, chunk) < 0) {
|
||||||
|
|
||||||
/* pa_log("UNDERRUN: %lu", pa_memblockq_get_length(s->memblockq)); */
|
/* pa_log("UNDERRUN: %lu", (unsigned long) pa_memblockq_get_length(s->memblockq)); */
|
||||||
|
|
||||||
if (s->drain_request && pa_sink_input_safe_to_remove(i)) {
|
if (s->drain_request && pa_sink_input_safe_to_remove(i)) {
|
||||||
s->drain_request = FALSE;
|
s->drain_request = FALSE;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue