[vlc-devel] [PATCH 1/4] es_out: add controls to cycle through ES tracks
Rémi Denis-Courmont
remi at remlab.net
Wed Nov 14 17:59:16 CET 2018
Le keskiviikkona 14. marraskuuta 2018, 18.50.15 EET Thomas Guillem a écrit :
> With 2 new internal controls: ES_OUT_SET_ES_NEXT and ES_OUT_SET_ES_PREV.
> This will fix a TOCTOU issue when selecting next or previous tracks.
What ToCToU issue? If a track is added or removed at about the same time as
the user cycles, there is an intrinsic race. Intrinsic races can. by
definition, not be fixed.
For instance, this will still select a track one microsecond before it ends.
From the user's point of view, that's no better than selecting a track that
ended one microsecond ago.
Of coruse, the engine must be robust and must not trigger UB, not even on
intrinsic races. As far as I know, the new ES reference counting already
solve that. But the timing-dependent behaviour cannot be avoided here. So I
would rather not add hopeless complexity.
--
雷米‧德尼-库尔蒙
http://www.remlab.net/
More information about the vlc-devel
mailing list