projects
/
platform
/
upstream
/
pulseaudio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
54c9fa9
)
solaris: Fix get_playback_buffered_bytes() return value.
author
Tanu Kaskinen
<tanuk@iki.fi>
Fri, 4 Jan 2013 14:49:52 +0000
(16:49 +0200)
committer
Tanu Kaskinen
<tanuk@iki.fi>
Fri, 4 Jan 2013 14:49:52 +0000
(16:49 +0200)
Based on a patch by Brian Cameron <brian.cameron@oracle.com>.
src/modules/module-solaris.c
patch
|
blob
|
history
diff --git
a/src/modules/module-solaris.c
b/src/modules/module-solaris.c
index 753c1a1fd5c1593f0780ac3d150086c2d47a1042..eea5c0d187aa859eb9bf0d63b53e513b203a764a 100644
(file)
--- a/
src/modules/module-solaris.c
+++ b/
src/modules/module-solaris.c
@@
-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) {