<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - 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"
href="https://bugs.freedesktop.org/show_bug.cgi?id=103103#c7">Comment # 7</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - 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"
href="https://bugs.freedesktop.org/show_bug.cgi?id=103103">bug 103103</a>
from <span class="vcard"><a class="email" href="mailto:mkid.dev@gmail.com" title="mkid.dev@gmail.com">mkid.dev@gmail.com</a>
</span></b>
<pre>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);</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>