From 7187ab42714265e2fd381e43c44bfc672a1d257e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 21 Jan 2010 17:11:14 +0100 Subject: [PATCH] m3u8: support fragments without title Can play http://examples.iphonestreaming.org/cvem/stream/stream_ep_128k.m3u8 --- HLS/m3u8.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/HLS/m3u8.py b/HLS/m3u8.py index 0827d37..17dca8f 100644 --- a/HLS/m3u8.py +++ b/HLS/m3u8.py @@ -140,11 +140,12 @@ class M3U8(object): elif l.startswith('#EXTINF'): v = l[8:].split(',') d = dict(file=self._lines.next().strip(), - title=v[1].strip(), duration=int(v[0]), sequence=i, discontinuity=discontinuity, allow_cache=allow_cache) + if len(v) >= 2: + d['title'] = v[1].strip() discontinuity = False i += 1 new = self._set_file(i, d) -- 2.1.4