[vlc-devel] [PATCH 2/2] input: don't override "time" and "position" when user seeks

Rémi Denis-Courmont remi at remlab.net
Fri Jun 10 16:16:48 CEST 2016


Le 2016-06-10 16:03, Thomas Guillem a écrit :
>> > The input_thread_t could override theses var before the seek 
>> controls
>> > were
>> > processed (from MainLoopStatistics()). This could lead to an UI
>> > glitch: the
>> > seek bar goes back to the previous position and then return to the
>> > seek
>> > position when the control is processed.
>>
>> There are no ways to avoid that. Someone (Derk Jan, IIRC) already 
>> added
>> a work around for this glitch aeons ago, which mostly works. But 
>> there
>> is always a race where a the value of the variable(s) is queried 
>> right
>> after a seek request, before the input thread has had the time to 
>> adjust
>> the value(s).
>
> This issue is still easily reproducible with UHD videos on desktop. 
> It
> happens a lot on VLC ports. I tried to do a hack in the android port,
> but it's not a perfect one (and it's ugly)...

Your patch does not fix the glitch. As long as interfaces call set 
"time" and/or "position" to seek, the values will not represent the 
current state.

There are three solutions, none of which you'll probably like:

1) The variables represent the current time only, are set exclusively 
by the input thread. UI must seek by another mean. (Like audio output 
variables.)
2) The variables are used exclusively to request seek. Current time 
must be retrieved by another mean. (Like filters variables.)
3) The variables are removed completely. Different means must be used 
both to request seek and to retrieve the current time.


-- 
Rémi Denis-Courmont
http://www.remlab.net/


More information about the vlc-devel mailing list