Page 1 of 1

getTime return 0 immediately after set

Posted: 21 Aug 2012 09:02
by vsee
If I get the time immediately after set,but most of time the result is 0,how can I work around this?

lastTime = preferences.getLong(PreferencesActivity.LAST_TIME, 0);
mLibVLC.setTime(lastTime);
long newtime=mLibVLC.getTime();

Here,I need to get the new time for future using,lastTime is not suitable.

Re: getTime return 0 immediately after set

Posted: 21 Aug 2012 14:32
by edwardw
Probably the demux hasn't seeked yet, seeking is not instant you know.

Re: getTime return 0 immediately after set

Posted: 21 Aug 2012 15:21
by vsee
Understand. Thank you Sir,you are always so kind.