Commit e37f42f4 authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

demux:mkv: do not return VLC_EGENERIC on DEMUX_GET_LENGTH when the duration is unknown

The doc says to return 0 (VLC_TS_INVALID)
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 9c87aa8e
......@@ -340,11 +340,10 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_GET_LENGTH:
pi64 = va_arg( args, int64_t * );
if( p_sys->f_duration > 0.0 )
{
*pi64 = static_cast<int64_t>( p_sys->f_duration * 1000 );
return VLC_SUCCESS;
}
return VLC_EGENERIC;
else
*pi64 = VLC_TS_INVALID;
return VLC_SUCCESS;
case DEMUX_GET_POSITION:
pf = va_arg( args, double * );
......
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