<html><head></head><body>So what? An asynchronous filter would be able to output until close returns, not until close starts. Also some filters may output some place else (e.g. scene) and distinguish between flush and drain at that level.<br><br>You're just making assumptions/restrictions in the core about implementation decisions and details of the filters.<br><br><div class="gmail_quote">Le 13 octobre 2020 09:49:56 GMT+03:00, Steve Lhomme <robux4@ycbcr.xyz> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">On 2020-10-13 8:37, Rémi Denis-Courmont wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">Hi,<br><br>I don't think that's correct. A filter could very well want to drain <br>rather than flush at close, or whatever. It's no surprise that flushing <br>is often done at close but I don't think it should be forced.<br></blockquote><br>This is a Close call. At this point the filter cannot decide to drain, <br>there's noone left to receive the pictures. On the other hand, if it has <br>buffers pending, it MUST release them on Close. It can be done <br>internally or via a global Flush.<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">And then it makes reading the code more difficult, as it's nonobvious <br>that Flush would be called implicitly at exit. Soon we'd see Close -> <br>Flush calls being added again to fix nonexistent leaks.<br></blockquote><br>It's a possibility but it's not a bug and won't cause any problem, just <br>wasted CPU cycles. Code review or debugging should avoid this in most cases.<br><br>Having filters with dangling pictures/blocks on Close is totally <br>preventable by making sure we always flush. It also avoids duplicate <br>code in Close when the Flush is already coded. I can see some other <br>filters that could be simplified because of this.<hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a></pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>