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

hls: Don't fail when a STREAM-INF is commented.

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
(cherry picked from commit 56a345ef)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent cef11dd9
...@@ -1033,6 +1033,13 @@ static int parse_M3U8(stream_t *s, vlc_array_t *streams, uint8_t *buffer, const ...@@ -1033,6 +1033,13 @@ static int parse_M3U8(stream_t *s, vlc_array_t *streams, uint8_t *buffer, const
if (uri == NULL) if (uri == NULL)
err = VLC_ENOMEM; err = VLC_ENOMEM;
else else
{
if (*uri == '#')
{
msg_Info(s, "Skipping invalid stream-inf: %s", uri);
free(uri);
}
else
{ {
hls_stream_t *hls = NULL; hls_stream_t *hls = NULL;
err = parse_StreamInformation(s, &streams, &hls, line, uri); err = parse_StreamInformation(s, &streams, &hls, line, uri);
...@@ -1057,6 +1064,7 @@ static int parse_M3U8(stream_t *s, vlc_array_t *streams, uint8_t *buffer, const ...@@ -1057,6 +1064,7 @@ static int parse_M3U8(stream_t *s, vlc_array_t *streams, uint8_t *buffer, const
hls->size = hls_GetStreamSize(hls); /* Stream size (approximate) */ hls->size = hls_GetStreamSize(hls); /* Stream size (approximate) */
} }
} }
}
p_begin = p_read; p_begin = p_read;
} }
......
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