Commit 52d25d6d authored by François Cartegnie's avatar François Cartegnie 🤞

demux: playlist: fix broken m3u logic (fix #18544)

parent 846c4d18
......@@ -114,17 +114,18 @@ int Import_M3U( vlc_object_t *p_this )
&& !vlc_ascii_strcasecmp(type, "application/vnd.apple.mpegurl")) /* HLS */
match = false;
else
if (stream_HasExtension(p_stream, ".m3u8")
|| stream_HasExtension(p_stream, ".m3u")
|| (type != NULL && vlc_ascii_strcasecmp(type, "audio/mpegurl") == 0))
match = !IsHLS(p_peek, i_peek);
else
if (memcmp(p_peek, "#EXTM3U", 7 ) == 0
|| stream_HasExtension(p_stream, ".vlc")
|| (type != NULL
&& (vlc_ascii_strcasecmp(type, "application/mpegurl") == 0
|| vlc_ascii_strcasecmp(type, "application/x-mpegurl") == 0
|| vlc_ascii_strcasecmp(type, "audio/mpegurl") == 0
|| vlc_ascii_strcasecmp(type, "vnd.apple.mpegURL") == 0
|| vlc_ascii_strcasecmp(type, "audio/x-mpegurl") == 0))
|| stream_HasExtension(p_stream, ".m3u8")
|| stream_HasExtension(p_stream, ".m3u"))
match = !IsHLS(p_peek, i_peek);
else
if (stream_HasExtension(p_stream, ".vlc")
|| strncasecmp((const char *)p_peek, "RTSPtext", 8) == 0
|| ContainsURL(p_peek, i_peek))
match = true;
......
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