Commit 74a3b3f1 authored by FUJISAWA Tooru's avatar FUJISAWA Tooru Committed by Felix Paul Kühne

screen: return correct time for DEMUX_GET_TIME

Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 6a4cd277
...@@ -235,6 +235,8 @@ static int Open( vlc_object_t *p_this ) ...@@ -235,6 +235,8 @@ static int Open( vlc_object_t *p_this )
p_sys->es = es_out_Add( p_demux->out, &p_sys->fmt ); p_sys->es = es_out_Add( p_demux->out, &p_sys->fmt );
p_sys->i_start = mdate();
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -293,6 +295,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) ...@@ -293,6 +295,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
{ {
bool *pb; bool *pb;
int64_t *pi64; int64_t *pi64;
demux_sys_t *p_sys = p_demux->p_sys;
switch( i_query ) switch( i_query )
{ {
...@@ -313,7 +316,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) ...@@ -313,7 +316,7 @@ 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 * );
*pi64 = mdate(); *pi64 = mdate() - p_sys->i_start;
return VLC_SUCCESS; return VLC_SUCCESS;
/* TODO implement others */ /* TODO implement others */
......
...@@ -48,6 +48,8 @@ struct demux_sys_t ...@@ -48,6 +48,8 @@ struct demux_sys_t
mtime_t i_next_date; mtime_t i_next_date;
int i_incr; int i_incr;
mtime_t i_start;
#ifdef SCREEN_SUBSCREEN #ifdef SCREEN_SUBSCREEN
bool b_follow_mouse; bool b_follow_mouse;
unsigned int i_screen_height; unsigned int i_screen_height;
......
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