Commit 7bafd5e5 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>
(cherry picked from commit e06362372ebb2e7d2a0ce0924703717807fb73ed)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent f6399b22
......@@ -1326,21 +1326,11 @@ static int get_HTTPLiveMetaPlaylist(stream_t *s, vlc_array_t **streams)
dst = hls_Copy(src, false);
if (dst == NULL)
return VLC_ENOMEM;
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 */
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)
err = VLC_EGENERIC;
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