[vlc-devel] [RFC] prefetch: Invalidate the cache when returning from pause

Luca Barbato lu_zero at gentoo.org
Fri Sep 25 17:08:14 CEST 2015

It should be done only on network streams that might or might not
time-out, since then the stream_Read would return a spurious
End of File.

The more I'm digging the more seems that this one is the simplest way to
recover from network timeouts during a pause. Help in getting it better
is welcome.

 modules/stream_filter/prefetch.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/stream_filter/prefetch.c b/modules/stream_filter/prefetch.c
index 42085c3..b7f8878 100644
--- a/modules/stream_filter/prefetch.c
+++ b/modules/stream_filter/prefetch.c
@@ -179,6 +179,9 @@ static void *Thread(void *data)

+            if (ThreadSeek(stream, sys->stream_offset))
+                break;
             /* Resume the underlying stream */
             msg_Dbg(stream, "resuming");
             ThreadControl(stream, STREAM_SET_PAUSE_STATE, false);

More information about the vlc-devel mailing list