mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-31 22:25:33 -04:00
solaris: Fix get_playback_buffered_bytes() return value.
Based on a patch by Brian Cameron <brian.cameron@oracle.com>.
This commit is contained in:
parent
54c9fa97bd
commit
e530feb62c
1 changed files with 4 additions and 1 deletions
|
|
@ -163,7 +163,10 @@ static uint64_t get_playback_buffered_bytes(struct userdata *u) {
|
|||
|
||||
pa_smoother_put(u->smoother, pa_rtclock_now(), pa_bytes_to_usec(played_bytes, &u->sink->sample_spec));
|
||||
|
||||
return u->written_bytes - played_bytes;
|
||||
if (u->written_bytes > played_bytes)
|
||||
return u->written_bytes - played_bytes;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
static pa_usec_t sink_get_latency(struct userdata *u, pa_sample_spec *ss) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue