Commit 0ea273e0 authored by Salah-Eddin Shaban's avatar Salah-Eddin Shaban Committed by Jean-Baptiste Kempf

DShow: correct elapsed time

Close #16977
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent bd72ca7c
......@@ -76,5 +76,6 @@ struct access_sys_t
int i_height;
int i_chroma;
bool b_chroma; /* Force a specific chroma on the dshow input */
mtime_t i_start;
};
......@@ -754,6 +754,7 @@ static int DemuxOpen( vlc_object_t *p_this )
p_stream->p_es = es_out_Add( p_demux->out, &fmt );
}
p_sys->i_start = mdate();
return VLC_SUCCESS;
}
......@@ -1932,6 +1933,8 @@ static int DemuxControl( demux_t *p_demux, int i_query, va_list args )
bool *pb;
int64_t *pi64;
access_sys_t *p_sys = ( access_sys_t * ) p_demux->p_sys;
switch( i_query )
{
/* Special for access_demux */
......@@ -1951,7 +1954,7 @@ static int DemuxControl( 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 */
......
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