[vlc-commits] prefetch: do not defer pause

Rémi Denis-Courmont git at videolan.org
Tue Oct 4 16:40:49 CEST 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Oct  2 23:38:31 2016 +0300| [8c5a692e1da8fad82f1c4f4eefdf175ac276070d] | committer: Rémi Denis-Courmont

prefetch: do not defer pause

Do not wait for full buffers to pause the underlying stream. This
improves responsiveness (upon resumption) for live streams. This also
ensures that no I/O is done while the input thread is paused; some apps
might reasonably expect such behaviour.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8c5a692e1da8fad82f1c4f4eefdf175ac276070d
---

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

diff --git a/modules/stream_filter/prefetch.c b/modules/stream_filter/prefetch.c
index 6832801..61bda6b 100644
--- a/modules/stream_filter/prefetch.c
+++ b/modules/stream_filter/prefetch.c
@@ -174,6 +174,10 @@ static void *Thread(void *data)
         {   /* Need to seek backward */
             if (ThreadSeek(stream, sys->stream_offset))
                 break;
+
+            sys->buffer_offset = sys->stream_offset;
+            sys->buffer_length = 0;
+            sys->eof = false;
             continue;
         }
 
@@ -195,6 +199,10 @@ static void *Thread(void *data)
         {   /* Large skip: seek forward */
             if (ThreadSeek(stream, sys->stream_offset))
                 break;
+
+            sys->buffer_offset = sys->stream_offset;
+            sys->buffer_length = 0;
+            sys->eof = false;
             continue;
         }
 



More information about the vlc-commits mailing list