[vlc-commits] demux: dash: index time is scaled
Francois Cartegnie
git at videolan.org
Fri May 15 21:29:30 CEST 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri May 15 17:13:09 2015 +0200| [800a74a5b95a0e999b2ee9aa2ff25e95986c6ffa] | committer: Francois Cartegnie
demux: dash: index time is scaled
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=800a74a5b95a0e999b2ee9aa2ff25e95986c6ffa
---
modules/demux/dash/mp4/AtomsReader.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/demux/dash/mp4/AtomsReader.cpp b/modules/demux/dash/mp4/AtomsReader.cpp
index 9630eff..c7e42d3 100644
--- a/modules/demux/dash/mp4/AtomsReader.cpp
+++ b/modules/demux/dash/mp4/AtomsReader.cpp
@@ -71,11 +71,12 @@ bool AtomsReader::parseBlock(void *buffer, size_t size, BaseRepresentation *rep)
MP4_Box_data_sidx_t *sidx = sidxbox->data.p_sidx;
point.offset = sidx->i_first_offset;
point.time = 0;
- for(uint16_t i=0; i<sidx->i_reference_count; i++)
+ for(uint16_t i=0; i<sidx->i_reference_count && sidx->i_timescale; i++)
{
splitlist.push_back(point);
point.offset += sidx->p_items[i].i_referenced_size;
- point.time += sidx->p_items[i].i_subsegment_duration;
+ point.time += CLOCK_FREQ * sidx->p_items[i].i_subsegment_duration /
+ sidx->i_timescale;
}
rep->SplitUsingIndex(splitlist);
rep->getPlaylist()->debug();
More information about the vlc-commits
mailing list