Commit 3fad96bf authored by Laurent Aimar's avatar Laurent Aimar

Fixed asf media length (close #2674 and close #3429).

parent 81a42a9e
...@@ -1014,7 +1014,9 @@ static int DemuxInit( demux_t *p_demux ) ...@@ -1014,7 +1014,9 @@ static int DemuxInit( demux_t *p_demux )
/* calculate the time duration in micro-s */ /* calculate the time duration in micro-s */
p_sys->i_length = (mtime_t)p_sys->p_fp->i_play_duration / 10 * p_sys->i_length = (mtime_t)p_sys->p_fp->i_play_duration / 10 *
(mtime_t)i_count / (mtime_t)i_count /
(mtime_t)p_sys->p_fp->i_data_packets_count; (mtime_t)p_sys->p_fp->i_data_packets_count - p_sys->p_fp->i_preroll * 1000;
if( p_sys->i_length < 0 )
p_sys->i_length = 0;
if( p_sys->i_length > 0 ) if( p_sys->i_length > 0 )
{ {
......
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