[vlc-commits] screen: return correct time for DEMUX_GET_TIME
FUJISAWA Tooru
git at videolan.org
Wed Feb 27 08:54:46 CET 2013
vlc | branch: master | FUJISAWA Tooru <arai_a at mac.com> | Wed Feb 27 01:10:14 2013 +0900| [74a3b3f19f3f15843e913ce347c237eb23375f6f] | committer: Felix Paul Kühne
screen: return correct time for DEMUX_GET_TIME
Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=74a3b3f19f3f15843e913ce347c237eb23375f6f
---
modules/access/screen/screen.c | 5 ++++-
modules/access/screen/screen.h | 2 ++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/access/screen/screen.c b/modules/access/screen/screen.c
index db0601d..8340306 100644
--- a/modules/access/screen/screen.c
+++ b/modules/access/screen/screen.c
@@ -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->i_start = mdate();
+
return VLC_SUCCESS;
}
@@ -293,6 +295,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
{
bool *pb;
int64_t *pi64;
+ demux_sys_t *p_sys = p_demux->p_sys;
switch( i_query )
{
@@ -313,7 +316,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_GET_TIME:
pi64 = (int64_t*)va_arg( args, int64_t * );
- *pi64 = mdate();
+ *pi64 = mdate() - p_sys->i_start;
return VLC_SUCCESS;
/* TODO implement others */
diff --git a/modules/access/screen/screen.h b/modules/access/screen/screen.h
index 61c2b2e..cd5fe3b 100644
--- a/modules/access/screen/screen.h
+++ b/modules/access/screen/screen.h
@@ -48,6 +48,8 @@ struct demux_sys_t
mtime_t i_next_date;
int i_incr;
+ mtime_t i_start;
+
#ifdef SCREEN_SUBSCREEN
bool b_follow_mouse;
unsigned int i_screen_height;
More information about the vlc-commits
mailing list