Commit 27c7a735 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

MP4: do not nul time scale

Some MP4-knowledgeable dev (fenrir?) really should check that this is
not too restrictive a check.
parent 32b8a2ac
......@@ -472,6 +472,11 @@ static int Open( vlc_object_t * p_this )
else
{
p_sys->i_timescale = p_mvhd->data.p_mvhd->i_timescale;
if( p_sys->i_timescale == 0 )
{
msg_Err( p_this, "bad timescale" );
goto error;
}
p_sys->i_duration = p_mvhd->data.p_mvhd->i_duration;
}
......@@ -1995,6 +2000,8 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track,
}
p_track->i_timescale = p_mdhd->data.p_mdhd->i_timescale;
if( !p_track->i_timescale )
return;
for( i = 0; i < 3; i++ )
{
......
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