[vlc-commits] demux: dash: fix playback with implicit init segments

Francois Cartegnie git at videolan.org
Wed Oct 7 21:14:53 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Oct  7 21:14:19 2015 +0200| [e78da1e3a2d5efcde88a3c2c529ea08977a31a18] | committer: Francois Cartegnie

demux: dash: fix playback with implicit init segments

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

 modules/demux/dash/mpd/IsoffMainParser.cpp |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules/demux/dash/mpd/IsoffMainParser.cpp b/modules/demux/dash/mpd/IsoffMainParser.cpp
index 40645ae..6108077 100644
--- a/modules/demux/dash/mpd/IsoffMainParser.cpp
+++ b/modules/demux/dash/mpd/IsoffMainParser.cpp
@@ -350,6 +350,14 @@ size_t IsoffMainParser::parseSegmentBase(Node * segmentBaseNode, SegmentInformat
 
     parseInitSegment(DOMHelper::getFirstChildElementByName(segmentBaseNode, "Initialization"), base, info);
 
+    if(!base->initialisationSegment.Get() && base->indexSegment.Get() && base->indexSegment.Get()->getOffset())
+    {
+        Segment *initSeg = new InitSegment( info );
+        initSeg->setSourceUrl(base->getUrlSegment().toString());
+        initSeg->setByteRange(0, base->indexSegment.Get()->getOffset() - 1);
+        base->initialisationSegment.Set(initSeg);
+    }
+
     info->setSegmentBase(base);
 
     return 1;



More information about the vlc-commits mailing list