[vlc-commits] demux: mp4: read fragmented movie duration
Francois Cartegnie
git at videolan.org
Mon Apr 14 21:17:47 CEST 2014
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Apr 14 20:58:13 2014 +0200| [ad92c4f657007cd8c52b30a596f852f15cace130] | committer: Francois Cartegnie
demux: mp4: read fragmented movie duration
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ad92c4f657007cd8c52b30a596f852f15cace130
---
modules/demux/mp4/mp4.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index a07ed18..52c31cd 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -568,6 +568,14 @@ static int Open( vlc_object_t * p_this )
p_sys->i_duration = p_mvhd->data.p_mvhd->i_duration;
}
+ /* Try in mehd if fragmented */
+ if ( p_sys->i_duration == 0 )
+ {
+ MP4_Box_t *p_mehd = MP4_BoxGet( p_demux->p_sys->p_root, "moov/mvex/mehd");
+ if ( p_mehd )
+ p_sys->i_duration = p_mehd->data.p_mehd->i_fragment_duration;
+ }
+
if( !( p_sys->i_tracks = MP4_BoxCount( p_sys->p_root, "/moov/trak" ) ) )
{
msg_Err( p_demux, "cannot find any /moov/trak" );
More information about the vlc-commits
mailing list