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

demux: mp4: fix moof based absolute trun data offsets

(cherry picked from commit d432ea9f)
parent 031ead79
......@@ -4561,6 +4561,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*/;
......@@ -4599,6 +4600,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