[vlc-commits] demux: mp4: fix moof based absolute trun data offsets
Francois Cartegnie
git at videolan.org
Wed Feb 7 14:20:03 CET 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Feb 7 13:50:12 2018 +0100| [d432ea9f8995418239fa926b7ffc0cee1c7f4ff5] | committer: Francois Cartegnie
demux: mp4: fix moof based absolute trun data offsets
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d432ea9f8995418239fa926b7ffc0cee1c7f4ff5
---
modules/demux/mp4/mp4.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 06ae1ff2f3..41384a9818 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -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;
More information about the vlc-commits
mailing list