Skip to content
Snippets Groups Projects
Commit 94b80fd6 authored by François Cartegnie's avatar François Cartegnie :fingers_crossed:
Browse files

demux: smooth: patch moof sequence with sequence number

regression after 1a7915a5
parent 94e9250b
No related branches found
No related tags found
No related merge requests found
......@@ -36,12 +36,18 @@ IndexReader::IndexReader(vlc_object_t *obj)
{
}
bool IndexReader::parseIndex(block_t *p_block, BaseRepresentation *rep)
bool IndexReader::parseIndex(block_t *p_block, BaseRepresentation *rep, uint64_t sequence)
{
if(!rep || !parseBlock(p_block))
return false;
/* Do track ID fixup */
/* Fixup moof sequence as they do not monotonically increase
nor provide a way to have moof time on implicit discontinuity */
const MP4_Box_t *mfhd_box = MP4_BoxGet( rootbox, "moof/mfhd" );
if( mfhd_box )
SetDWBE( &p_block->p_buffer[mfhd_box->i_pos + 8 + 4], sequence );
/* Do track ID fixup, must match track #1 */
const MP4_Box_t *tfhd_box = MP4_BoxGet( rootbox, "moof/traf/tfhd" );
if ( tfhd_box )
SetDWBE( &p_block->p_buffer[tfhd_box->i_pos + 8 + 4], 0x01 );
......
......@@ -41,7 +41,7 @@ namespace smooth
{
public:
IndexReader(vlc_object_t *);
bool parseIndex(block_t *, BaseRepresentation *);
bool parseIndex(block_t *, BaseRepresentation *, uint64_t);
};
}
}
......
......@@ -49,7 +49,7 @@ void SmoothSegmentChunk::onDownload(block_t **pp_block)
return;
IndexReader br(rep->getPlaylist()->getVLCObject());
br.parseIndex(*pp_block, rep);
br.parseIndex(*pp_block, rep, sequence);
/* If timeshift depth is present, we use it for expiring segments
as we never update playlist itself */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment