[totem-pl-parser] plparse: Don't handle HLS playlists served as m3u8
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem-pl-parser] plparse: Don't handle HLS playlists served as m3u8
- Date: Wed, 25 Feb 2015 17:28:25 +0000 (UTC)
commit 6ac01895b5bb8f91f319dc04580c85fb4ddb7a14
Author: Bastien Nocera <hadess hadess net>
Date: Wed Feb 25 18:25:28 2015 +0100
plparse: Don't handle HLS playlists served as m3u8
This avoids us trying to parse HLS playlists served by badly configured
HTTP servers.
https://bugzilla.gnome.org/show_bug.cgi?id=745171
plparse/totem-pl-parser-lines.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/plparse/totem-pl-parser-lines.c b/plparse/totem-pl-parser-lines.c
index 883dae9..935f068 100644
--- a/plparse/totem-pl-parser-lines.c
+++ b/plparse/totem-pl-parser-lines.c
@@ -42,6 +42,8 @@
#ifndef TOTEM_PL_PARSER_MINI
#define EXTINF "#EXTINF:"
+#define EXTINF_HLS "#EXT-X-STREAM-INF"
+#define EXTINF_HLS2 "#EXT-X-TARGETDURATION"
#define EXTVLCOPT_AUDIOTRACK "#EXTVLCOPT:audio-track-id="
static char *
@@ -413,6 +415,12 @@ totem_pl_parser_add_m3u (TotemPlParser *parser,
}
}
+ if (strstr (contents, EXTINF_HLS) ||
+ strstr (contents, EXTINF_HLS2)) {
+ g_free (contents);
+ return retval;
+ }
+
/* is non-NULL if there's an EXTINF on a preceding line */
extinfo = NULL;
extvlcopt_audiotrack = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]