<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style>
</head>
<body><div><br></div>
<div>On Thu, Nov 15, 2018, at 13:23, Rémi Denis-Courmont wrote:<br></div>
<blockquote type="cite"><div>Hi,<br></div>
<div><br></div>
<div>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.<br></div>
<div><br></div>
<div>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.<br></div>
<div>This will have a major impact on the ES output internals though.<br></div>
</blockquote><div><br></div>
<div>Hum sorry, I just received this answer but I already pushed.<br></div>
<div><br></div>
<div>I already thought about your solution, yes. It will avoid useless track change if the user spam the next button and will respect the number of time the user pressed it.<br></div>
<div><br></div>
<div>I can revert the es_out part, and use the dumb way to cycle through tracks (waiting for a correct implementation).<br></div>
<div><br></div>
<blockquote type="cite"><div><br></div>
<div defang_data-gmailquote="yes"><div>Le 14 novembre 2018 19:13:43 GMT+02:00, Thomas Guillem <thomas@gllm.fr> a écrit :<br></div>
<blockquote defang_data-gmailquote="yes" style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;"><pre><div><br></div>
<div>On Wed, Nov 14, 2018, at 17:59, Rémi Denis-Courmont wrote:<br></div>
<blockquote defang_data-gmailquote="yes" style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(114, 159, 207);border-left-style:solid;border-left-width:1px;padding-left:1ex;"><div>Le keskiviikkona 14. marraskuuta 2018, 18.50.15 EET Thomas Guillem a écrit :<br></div>
<blockquote defang_data-gmailquote="yes" style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(173, 127, 168);border-left-style:solid;border-left-width:1px;padding-left:1ex;"><div>With 2 new internal controls: ES_OUT_SET_ES_NEXT and ES_OUT_SET_ES_PREV.<br></div>
<div>This will fix a TOCTOU issue when selecting next or previous tracks.<br></div>
</blockquote><div>What ToCToU issue? If a track is added or removed at about the same time as <br></div>
<div>the user cycles, there is an intrinsic race. Intrinsic races can. by <br></div>
<div>definition, not be fixed.<br></div>
</blockquote><div><br></div>
<div>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.<br></div>
<div>This is far more visible with programs that can take a longer time to initialize.<br></div>
<div><br></div>
<div>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.<br></div>
<div><br></div>
<div>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 ES_OUT_ES_POLICY_SIMULTANEOUS.<br></div>
<div><br></div>
<div><br></div>
<div>> <br></div>
<blockquote defang_data-gmailquote="yes" style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-color:rgb(114, 159, 207);border-left-style:solid;border-left-width:1px;padding-left:1ex;"><div>For instance, this will still select a track one microsecond before it ends. <br></div>
<div>From the user's point of view, that's no better than selecting a track that <br></div>
<div>ended one microsecond ago.<br></div>
<div><br></div>
<div>Of coruse, the engine must be robust and must not trigger UB, not even on <br></div>
<div>intrinsic races.  As far as I know, the new ES reference counting already <br></div>
<div>solve that. But the timing-dependent behaviour cannot be avoided here. So I <br></div>
<div>would rather not add hopeless complexity.<br></div>
<div><br></div>
<div>-- <br></div>
<div>雷米‧德尼-库尔蒙<br></div>
<div><a href="http://www.remlab.net/">http://www.remlab.net/</a><hr>vlc-devel mailing list<br></div>
<div>To unsubscribe or modify your subscription options:<br></div>
<div><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div>
</blockquote><div><hr>vlc-devel mailing list<br></div>
<div>To unsubscribe or modify your subscription options:<br></div>
<div><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div>
</pre></blockquote></div>
<div><br></div>
<div>-- <br></div>
<div>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. <br></div>
<div><u>_______________________________________________</u><br></div>
<div>vlc-devel mailing list<br></div>
<div>To unsubscribe or modify your subscription options:<br></div>
<div><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div>
</blockquote><div><br></div>
</body>
</html>