[vlc-commits] demux: smooth: fix tfhd track id patch for non live streams

Francois Cartegnie git at videolan.org
Mon Nov 2 22:16:41 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Nov  2 21:58:26 2015 +0100| [0b4e9f1bab9f34ffc9ccdfc46bd5fea85a058076] | committer: Francois Cartegnie

demux: smooth: fix tfhd track id patch for non live streams

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

 modules/demux/smooth/mp4/IndexReader.cpp        |    3 +++
 modules/demux/smooth/playlist/SmoothSegment.cpp |    3 +--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/demux/smooth/mp4/IndexReader.cpp b/modules/demux/smooth/mp4/IndexReader.cpp
index 0869f33..163da26 100644
--- a/modules/demux/smooth/mp4/IndexReader.cpp
+++ b/modules/demux/smooth/mp4/IndexReader.cpp
@@ -42,6 +42,9 @@ bool IndexReader::parseIndex(block_t *p_block, BaseRepresentation *rep)
     if ( tfhd_box )
         SetDWBE( &p_block->p_buffer[tfhd_box->i_pos + 8 + 4], 0x01 );
 
+    if(!rep->getPlaylist()->isLive())
+        return true;
+
     const MP4_Box_t *uuid_box = MP4_BoxGet( rootbox, "moof/traf/uuid" );
     while( uuid_box && uuid_box->i_type == ATOM_uuid )
     {
diff --git a/modules/demux/smooth/playlist/SmoothSegment.cpp b/modules/demux/smooth/playlist/SmoothSegment.cpp
index 2edf8c2..b26dfbb 100644
--- a/modules/demux/smooth/playlist/SmoothSegment.cpp
+++ b/modules/demux/smooth/playlist/SmoothSegment.cpp
@@ -35,8 +35,7 @@ SmoothSegment::SmoothSegment(SegmentInformation *parent) :
 
 void SmoothSegment::onChunkDownload(block_t **pp_block, SegmentChunk *, BaseRepresentation *rep)
 {
-    if(!rep || ((*pp_block)->i_flags & BLOCK_FLAG_HEADER) == 0 ||
-       !rep->getPlaylist()->isLive())
+    if(!rep || ((*pp_block)->i_flags & BLOCK_FLAG_HEADER) == 0)
         return;
 
     IndexReader br(rep->getPlaylist()->getVLCObject());



More information about the vlc-commits mailing list