Commit d432ea9f authored by François Cartegnie's avatar François Cartegnie 🤞

demux: mp4: fix moof based absolute trun data offsets

parent c3f5c5f5
......@@ -4634,6 +4634,7 @@ static int FragCreateTrunIndex( demux_t *p_demux, MP4_Box_t *p_moof,
{
i_traf_base_data_offset = BOXDATA(p_tfhd)->i_base_data_offset;
}
/* ignored if MP4_TFHD_BASE_DATA_OFFSET */
else if ( BOXDATA(p_tfhd)->i_flags & MP4_TFHD_DEFAULT_BASE_IS_MOOF )
{
i_traf_base_data_offset = p_moof->i_pos /* + 8*/;
......@@ -4672,6 +4673,11 @@ static int FragCreateTrunIndex( demux_t *p_demux, MP4_Box_t *p_moof,
{
i_trun_data_offset = BOXDATA(p_tfhd)->i_base_data_offset + p_trundata->i_data_offset;
}
/* ignored if MP4_TFHD_BASE_DATA_OFFSET */
else if ( BOXDATA(p_tfhd)->i_flags & MP4_TFHD_DEFAULT_BASE_IS_MOOF )
{
i_trun_data_offset = p_moof->i_pos + p_trundata->i_data_offset;
}
else
{
i_trun_data_offset += p_trundata->i_data_offset;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment