[vlc-devel] [PATCH 1/4] es_out: add controls to cycle through ES tracks
remi at remlab.net
Thu Nov 15 13:23:48 CET 2018
If the user cycles rapidly, e.g. by holding the hotkey, the input control queue will overflow, AFAIR. So this series does not really solve that corner case, AFAICT.
If you really want a race free system, you need to store the signed offset (in number of tracks) from the default selection to the user selection in the ES output, and an accumulator in the input state to avoid filling the control queue with multiple track change requests.
This will have a major impact on the ES output internals though.
Le 14 novembre 2018 19:13:43 GMT+02:00, Thomas Guillem <thomas at gllm.fr> a écrit :
>On Wed, Nov 14, 2018, at 17:59, Rémi Denis-Courmont wrote:
>> Le keskiviikkona 14. marraskuuta 2018, 18.50.15 EET Thomas Guillem a
>> > With 2 new internal controls: ES_OUT_SET_ES_NEXT and
>> > This will fix a TOCTOU issue when selecting next or previous
>> What ToCToU issue? If a track is added or removed at about the same
>> the user cycles, there is an intrinsic race. Intrinsic races can. by
>> definition, not be fixed.
>TOCTOU if the user cycles tracks rapidly. Some controls could be
>dropped in that case. If the user press 3 times the next track button,
>you want to be sure to select the fourth track.
>This is far more visible with programs that can take a longer time to
>This also prevent cycling if the es_out policy is
>ES_OUT_ES_POLICY_SIMULTANEOUS. You can't really do something clever if
>there are more than one tracks selected for a same category, so it's
>better to do nothing.
>If this patch is not accepted, I'll have to cycle through ES tracks
>from the client side and this won't prevent weird behavior in case of
>> For instance, this will still select a track one microsecond before
>> From the user's point of view, that's no better than selecting a
>> ended one microsecond ago.
>> Of coruse, the engine must be robust and must not trigger UB, not
>> intrinsic races. As far as I know, the new ES reference counting
>> solve that. But the timing-dependent behaviour cannot be avoided
>here. So I
>> would rather not add hopeless complexity.
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vlc-devel