mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
There was a race condition here that caused latency calculation to fail
miserably under some conditions. git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/ossman@392 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
ec87cb1571
commit
59aa6ca514
2 changed files with 0 additions and 11 deletions
|
|
@ -92,7 +92,6 @@ struct pa_stream {
|
|||
enum pa_stream_direction direction;
|
||||
uint32_t requested_bytes;
|
||||
uint64_t counter;
|
||||
pa_usec_t previous_time;
|
||||
enum pa_stream_state state;
|
||||
struct pa_mcalign *mcalign;
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ struct pa_stream *pa_stream_new(struct pa_context *c, const char *name, const st
|
|||
s->mcalign = pa_mcalign_new(pa_frame_size(ss), c->memblock_stat);
|
||||
|
||||
s->counter = 0;
|
||||
s->previous_time = 0;
|
||||
|
||||
s->corked = 0;
|
||||
s->interpolate = 0;
|
||||
|
|
@ -698,11 +697,6 @@ pa_usec_t pa_stream_get_time(struct pa_stream *s, const struct pa_latency_info *
|
|||
}
|
||||
}
|
||||
|
||||
if (usec < s->previous_time)
|
||||
usec = s->previous_time;
|
||||
|
||||
s->previous_time = usec;
|
||||
|
||||
return usec;
|
||||
}
|
||||
|
||||
|
|
@ -762,10 +756,6 @@ pa_usec_t pa_stream_get_interpolated_time(struct pa_stream *s) {
|
|||
usec = s->ipol_usec + pa_timeval_age(&s->ipol_timestamp);
|
||||
}
|
||||
|
||||
if (usec < s->previous_time)
|
||||
usec = s->previous_time;
|
||||
|
||||
s->previous_time = usec;
|
||||
return usec;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue