[vlc-commits] hls: Fixing playlist reloading.

Hugo Beauzée-Luyssen git at videolan.org
Tue Feb 7 12:12:12 CET 2012


vlc/vlc-2.0 | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Sun Jan 29 02:53:41 2012 +0100| [a0b699c956f7f14f266c6063d1c7cac73f1c3791] | committer: Jean-Baptiste Kempf

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>
(cherry picked from commit 64df9df7c3ec0141d8f9421e9177b2a94e21dba3)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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