[vlc-commits] hls: Fixing playlist reloading.

Hugo Beauzée-Luyssen git at videolan.org
Sun Feb 5 15:23:29 CET 2012


vlc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Sun Jan 29 02:53:41 2012 +0100| [64df9df7c3ec0141d8f9421e9177b2a94e21dba3] | committer: Jean-Paul Saman

hls: Fixing playlist reloading.

This patch fixes a case triggered when alive stream does not "have" a meta playlist. In
that case hls_Copy would fail as the uri is NULL. Restore the old behaviour by using the
base URL locations as input.

Signed-off-by: Jean-Paul Saman <jean-paul.saman at m2x.nl>

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

 modules/stream_filter/httplive.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
index b9a2a7c..e6c4b36 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -1094,7 +1094,11 @@ static int parse_M3U8(stream_t *s, vlc_array_t *streams, uint8_t *buffer, const
         else
         {
             /* No Meta playlist used */
-            hls = hls_New(streams, 0, 0, NULL);
+            char*   uri = ConstructUrl( &s->p_sys->m3u8 );
+            if ( uri == NULL )
+                return VLC_EGENERIC;
+            hls = hls_New(streams, 0, 0, uri);
+            free( uri );
             if (hls)
             {
                 /* Get TARGET-DURATION first */



More information about the vlc-commits mailing list