[vlc-commits] playlist/m3u: ignore input with HLS-specific Content-Type
Rémi Denis-Courmont
git at videolan.org
Wed Jun 28 22:51:13 CEST 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jun 28 23:40:28 2017 +0300| [7ce91b60a8e0789859c40264c015c1f25f090509] | committer: Rémi Denis-Courmont
playlist/m3u: ignore input with HLS-specific Content-Type
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7ce91b60a8e0789859c40264c015c1f25f090509
---
modules/demux/playlist/m3u.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/modules/demux/playlist/m3u.c b/modules/demux/playlist/m3u.c
index eb424395ca..576f834d9d 100644
--- a/modules/demux/playlist/m3u.c
+++ b/modules/demux/playlist/m3u.c
@@ -33,6 +33,7 @@
#include <vlc_common.h>
#include <vlc_access.h>
#include <vlc_charset.h>
+#include <vlc_strings.h>
#include "playlist.h"
@@ -78,6 +79,14 @@ int Import_M3U( vlc_object_t *p_this )
}
char *type = stream_MimeType(p_stream->p_source);
+ if (type != NULL
+ && (!vlc_ascii_strcasecmp(type, "application/vnd.apple.mpegurl")
+ || !vlc_ascii_strcasecmp(type, "audio/mpegurl")))
+ {
+ free(type);
+ return VLC_EGENERIC;
+ }
+
bool b_check_hls = true;
if( (type != NULL && !strcasecmp(type, "application/x-mpegurl") ) )
@@ -86,8 +95,7 @@ int Import_M3U( vlc_object_t *p_this )
return VLC_EGENERIC;
}
- if( stream_HasExtension( p_stream, ".m3u8" )
- || (type != NULL && !strcasecmp(type, "application/vnd.apple.mpegurl")))
+ if( stream_HasExtension( p_stream, ".m3u8" ) )
{
pf_dup = CheckUnicode; /* UTF-8 file type */
}
More information about the vlc-commits
mailing list