mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-09 13:29:59 -05:00
native: fix request counter miscalculations
Do not subtract bytes the client sends us beyond what we requested from our missing bytes counter. This was mostly a thinko that caused servers asking for too little data when the client initially sent more data than requested, because that data sent too much was accounted for twice. This commit fixes this miscalculation. http://bugzilla.redhat.com/show_bug.cgi?id=534130
This commit is contained in:
parent
c41ee00893
commit
8d356659e6
3 changed files with 55 additions and 57 deletions
|
|
@ -1113,6 +1113,8 @@ static playback_stream* playback_stream_new(
|
|||
|
||||
*missing = (uint32_t) pa_memblockq_pop_missing(s->memblockq);
|
||||
|
||||
/* pa_log("missing original: %li", (long int) *missing); */
|
||||
|
||||
*ss = s->sink_input->sample_spec;
|
||||
*map = s->sink_input->channel_map;
|
||||
|
||||
|
|
@ -1137,11 +1139,12 @@ static void playback_stream_request_bytes(playback_stream *s) {
|
|||
|
||||
m = pa_memblockq_pop_missing(s->memblockq);
|
||||
|
||||
/* pa_log("request_bytes(%lu) (tlength=%lu minreq=%lu length=%lu)", */
|
||||
/* pa_log("request_bytes(%lu) (tlength=%lu minreq=%lu length=%lu really missing=%lli)", */
|
||||
/* (unsigned long) m, */
|
||||
/* pa_memblockq_get_tlength(s->memblockq), */
|
||||
/* pa_memblockq_get_minreq(s->memblockq), */
|
||||
/* pa_memblockq_get_length(s->memblockq)); */
|
||||
/* pa_memblockq_get_length(s->memblockq), */
|
||||
/* (long long) pa_memblockq_get_tlength(s->memblockq) - (long long) pa_memblockq_get_length(s->memblockq)); */
|
||||
|
||||
if (m <= 0)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue