[vlc-commits] demux: adaptative: handle durationless manifests

Francois Cartegnie git at videolan.org
Sun Nov 1 22:59:36 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Nov  1 22:58:19 2015 +0100| [33ea1f237e228216fcb62a7e5fdbc5ecaa42dab1] | committer: Francois Cartegnie

demux: adaptative: handle durationless manifests

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=33ea1f237e228216fcb62a7e5fdbc5ecaa42dab1
---

 modules/demux/smooth/playlist/Parser.cpp |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/modules/demux/smooth/playlist/Parser.cpp b/modules/demux/smooth/playlist/Parser.cpp
index 4604f14..9411ecd 100644
--- a/modules/demux/smooth/playlist/Parser.cpp
+++ b/modules/demux/smooth/playlist/Parser.cpp
@@ -85,7 +85,13 @@ static SegmentTimeline *createTimeline(Node *streamIndexNode, uint64_t timescale
             }
             else
             {
-                cur.duration = prev.duration;
+                if(it != chunks.end())
+                {
+                    const Node *nextchunk = *(it + 1);
+                    cur.duration = Integer<uint64_t>(nextchunk->getAttributeValue("t"))
+                                 - Integer<uint64_t>(chunk->getAttributeValue("t"));
+                    b_cur_is_repeat &= (cur.duration == prev.duration);
+                }
             }
 
             if(chunk->hasAttribute("t"))



More information about the vlc-commits mailing list