From 1a557a06c1a25989d9fc644c64762c4561a9a218 Mon Sep 17 00:00:00 2001 From: Oliver Woodman Date: Thu, 27 Nov 2014 18:11:43 +0000 Subject: [PATCH] Support SmoothStreaming repeated chunk tags. --- .../SmoothStreamingManifestParser.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/library/src/main/java/com/google/android/exoplayer/smoothstreaming/SmoothStreamingManifestParser.java b/library/src/main/java/com/google/android/exoplayer/smoothstreaming/SmoothStreamingManifestParser.java index 1114c1e4d0..20aea8ad32 100644 --- a/library/src/main/java/com/google/android/exoplayer/smoothstreaming/SmoothStreamingManifestParser.java +++ b/library/src/main/java/com/google/android/exoplayer/smoothstreaming/SmoothStreamingManifestParser.java @@ -450,6 +450,7 @@ public class SmoothStreamingManifestParser implements ManifestParser tracks; @@ -504,9 +505,18 @@ public class SmoothStreamingManifestParser implements ManifestParser 1 && lastChunkDuration == -1L) { + throw new ParserException("Repeated chunk with unspecified duration"); + } + for (int i = 1; i < repeatCount; i++) { + chunkIndex++; + startTimes.add(startTime + (lastChunkDuration * i)); + } } private void parseStreamElementStartTag(XmlPullParser parser) throws ParserException {