[vlc-commits] httplive: Adjust conditions for playlist reloading

Heorhi Valakhanovich git at videolan.org
Tue Jan 7 08:08:32 CET 2014


vlc | branch: master | Heorhi Valakhanovich <valahanovich at tut.by> | Mon Dec 16 01:28:34 2013 +0300| [9cc6af385502109b03f69c282e935cbde4081756] | committer: Ilkka Ollakka

httplive: Adjust conditions for playlist reloading

Commit 7655d6c889d2425c1fd4615f7e2692df1a47470c changes HLS http
playlist reloading policy. But leaving only one fragment in buffer is
not enough. This patch ensures that less than three fragments in buffer
leads to playlist reloading. The overal result is more reliable http
streams.

Signed-off-by: Ilkka Ollakka <ileoo at videolan.org>

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

 modules/stream_filter/httplive.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
index 050d782..12304d3 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -1718,8 +1718,8 @@ static void* hls_Reload(void *p_this)
         mtime_t now = mdate();
         if (now >= p_sys->playlist.wakeup)
         {
-            /* reload the m3u8 if there are less than 2 segments what aren't downloaded */
-            if ( ( p_sys->download.segment - p_sys->playback.segment < 2 ) &&
+            /* reload the m3u8 if there are less than 3 segments what aren't downloaded */
+            if ( ( p_sys->download.segment - p_sys->playback.segment < 3 ) &&
                  ( hls_ReloadPlaylist(s) != VLC_SUCCESS) )
             {
                 /* No change in playlist, then backoff */



More information about the vlc-commits mailing list