[pulseaudio-tickets] [Bug 103103] The client has not a chance to provide data, when absolute offset is used in a stream without prebuffering and underrun happend for long time
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Nov 2 08:01:56 UTC 2017
https://bugs.freedesktop.org/show_bug.cgi?id=103103
--- Comment #7 from mkid.dev at gmail.com ---
The problem is composition of overflow (due to huge value returned by
pa_stream_writable_size()) and next underflow. The previous comment treated
underflow. The overflow can be addressed by change:
diff --git a/src/pulse/stream.c b/src/pulse/stream.c
index ee95757..87c5f9d 100644
--- a/src/pulse/stream.c
+++ b/src/pulse/stream.c
@@ -842,6 +842,9 @@ void pa_command_request(pa_pdispatch *pd, uint32_t command,
uint32_t tag, pa_tag
#ifdef STREAM_DEBUG
pa_log_debug("got request for %lli, now at %lli", (long long) bytes, (long
long) s->requested_bytes);
#endif
+ if (s->buffer_attr.tlength != -1)
+ if (s->requested_bytes > s->buffer_attr.tlength)
+ s->requested_bytes = s->buffer_attr.tlength;
if (s->requested_bytes > 0 && s->write_callback)
s->write_callback(s, (size_t) s->requested_bytes, s->write_userdata);
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20171102/1478a3c8/attachment.html>
More information about the pulseaudio-bugs
mailing list