[vlc-commits] demux: mp4: fill fragmented timescale on missing mvhd
Francois Cartegnie
git at videolan.org
Mon Aug 22 10:54:30 CEST 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Aug 22 16:52:10 2016 +0800| [a6b2f6cab2c90acef35b9c41dbc3e1d8fa4d7e62] | committer: Francois Cartegnie
demux: mp4: fill fragmented timescale on missing mvhd
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a6b2f6cab2c90acef35b9c41dbc3e1d8fa4d7e62
---
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 0295962..bc1694d 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -4091,6 +4091,12 @@ static bool AddFragment( demux_t *p_demux, MP4_Box_t *p_moox )
p_sys->i_timescale = BOXDATA(p_mvhd)->i_timescale;
p_sys->i_overall_duration = BOXDATA(p_mvhd)->i_duration;
}
+ else
+ {
+ p_sys->i_timescale = CLOCK_FREQ;
+ p_sys->i_overall_duration = CLOCK_FREQ;
+ msg_Warn( p_demux, "No valid mvhd found" );
+ }
if ( MP4_BoxCount( p_moox, "mvex" ) || !p_mvhd )
{ /* duration might be wrong an be set to whole duration :/ */
More information about the vlc-commits
mailing list