Commit 3ef51621 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

ttml: fix DEMUX_GET_TIME at end-of-stream

parent de1b8bc4
...@@ -75,10 +75,10 @@ static int Control( demux_t* p_demux, int i_query, va_list args ) ...@@ -75,10 +75,10 @@ static int Control( demux_t* p_demux, int i_query, va_list args )
case DEMUX_GET_TIME: case DEMUX_GET_TIME:
pi64 = (int64_t*)va_arg( args, int64_t * ); pi64 = (int64_t*)va_arg( args, int64_t * );
if( p_sys->i_subtitle < p_sys->i_subtitles ) if( p_sys->i_subtitle < p_sys->i_subtitles )
{
*pi64 = p_sys->subtitle[p_sys->i_subtitle].i_start; *pi64 = p_sys->subtitle[p_sys->i_subtitle].i_start;
return VLC_SUCCESS; else
} *pi64 = p_sys->i_length;
return VLC_SUCCESS;
case DEMUX_SET_TIME: case DEMUX_SET_TIME:
i64 = (int64_t)va_arg( args, int64_t ); i64 = (int64_t)va_arg( args, int64_t );
p_sys->i_subtitle = 0; p_sys->i_subtitle = 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