Commit aafc80c0 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: ts: fix divbyzero

parent d859d8a1
...@@ -1531,9 +1531,12 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) ...@@ -1531,9 +1531,12 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
i_length += p_pmt->pcr.i_pcroffset; i_length += p_pmt->pcr.i_pcroffset;
double i_pos = TimeStampWrapAround( p_pmt, double i_pos = TimeStampWrapAround( p_pmt,
p_pmt->pcr.i_current ) - p_pmt->pcr.i_first; p_pmt->pcr.i_current ) - p_pmt->pcr.i_first;
if( i_length > 0 )
{
*pf = i_pos / i_length; *pf = i_pos / i_length;
return VLC_SUCCESS; return VLC_SUCCESS;
} }
}
if( (i64 = stream_Size( p_sys->stream) ) > 0 ) if( (i64 = stream_Size( p_sys->stream) ) > 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