Commit e0636237 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen Committed by Jean-Baptiste Kempf

hls: Fixing playlist updating.

parse_M3U8 uses hls_GetLast to update the HLS current hls stream, so we
have to add it to the streams array before calling parse_M3U8
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent e618a581
...@@ -1326,21 +1326,11 @@ static int get_HTTPLiveMetaPlaylist(stream_t *s, vlc_array_t **streams) ...@@ -1326,21 +1326,11 @@ static int get_HTTPLiveMetaPlaylist(stream_t *s, vlc_array_t **streams)
dst = hls_Copy(src, false); dst = hls_Copy(src, false);
if (dst == NULL) if (dst == NULL)
return VLC_ENOMEM; return VLC_ENOMEM;
vlc_array_append(*streams, dst); vlc_array_append(*streams, dst);
}
/* Download new playlist file from server */
for (int i = 0; i < vlc_array_count(*streams); i++)
{
hls_stream_t *hls;
hls = (hls_stream_t *)vlc_array_item_at_index(*streams, i);
if (hls == NULL)
return VLC_EGENERIC;
/* Download playlist file from server */ /* Download playlist file from server */
uint8_t *buf = NULL; uint8_t *buf = NULL;
ssize_t len = read_M3U8_from_url(s, &hls->url, &buf); ssize_t len = read_M3U8_from_url(s, &dst->url, &buf);
if (len < 0) if (len < 0)
err = VLC_EGENERIC; err = VLC_EGENERIC;
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment