Commit 399c991f authored by Rafaël Carré's avatar Rafaël Carré

HLS demux: fix crash on invalid playlist

Close #8498
parent f24ef231
...@@ -1000,6 +1000,8 @@ static int parse_M3U8(stream_t *s, vlc_array_t *streams, uint8_t *buffer, const ...@@ -1000,6 +1000,8 @@ static int parse_M3U8(stream_t *s, vlc_array_t *streams, uint8_t *buffer, const
free(uri); free(uri);
if (hls)
{
/* 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, hls->url, &buf);
...@@ -1022,8 +1024,6 @@ static int parse_M3U8(stream_t *s, vlc_array_t *streams, uint8_t *buffer, const ...@@ -1022,8 +1024,6 @@ static int parse_M3U8(stream_t *s, vlc_array_t *streams, uint8_t *buffer, const
free(buf); free(buf);
} }
if (hls)
{
hls->version = version; hls->version = version;
if (!p_sys->b_live) if (!p_sys->b_live)
hls->size = hls_GetStreamSize(hls); /* Stream size (approximate) */ hls->size = hls_GetStreamSize(hls); /* Stream size (approximate) */
......
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