<html><head></head><body>I don't see how the error message is wrong. It is not permissible to read from a paused stream, by definition. This patch looks wrong to me.<br><br><div class="gmail_quote">Le 18 novembre 2019 16:00:49 GMT+02:00, Thomas Guillem <thomas@gllm.fr> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">This commit remove the wrong error message and put back the thread to sleep at<br>the end of the read.<hr> modules/stream_filter/prefetch.c | 5 ++++-<br> 1 file changed, 4 insertions(+), 1 deletion(-)<br><br>diff --git a/modules/stream_filter/prefetch.c b/modules/stream_filter/prefetch.c<br>index 2991c002bd2..7edb374e77e 100644<br>--- a/modules/stream_filter/prefetch.c<br>+++ b/modules/stream_filter/prefetch.c<br>@@ -309,9 +309,11 @@ static ssize_t Read(stream_t *stream, void *buf, size_t buflen)<br> return buflen;<br> <br> vlc_mutex_lock(&sys->lock);<br>+ bool was_paused = sys->paused;<br> if (sys->paused)<br> {<br>- msg_Err(stream, "reading while paused (buggy demux?)");<br>+ /* Reading while paused. Notify the thread to resume and put it back to<br>+ * sleep once the read is complete. */<br> sys->paused = false;<br> vlc_cond_signal(&sys->wait_space);<br> }<br>@@ -340,6 +342,7 @@ static ssize_t Read(stream_t *stream, void *buf, size_t buflen)<br> <br> memcpy(buf, sys->buffer + offset, copy);<br> sys->stream_offset += copy;<br>+ sys->paused = was_paused;<br> vlc_cond_signal(&sys->wait_space);<br> vlc_mutex_unlock(&sys->lock);<br> return copy;</pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>