<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p>I do not think that comparing duration and delay makes any mathematical/physical sense. The result will be even more arbitrary than it currently is.</p>
</blockquote>
<p>Since we got functionality in order to support resampling (to shrink the drift while maintaining playback), it should probably be used under circumstances as what is mentioned; or well, that was what went through my head when I wrote the patch.</p>
<p>The duration is just as much part of the entity as the PTS, and if one is used to make decisions about potentially discarding the entity itself, I’d say it is equally safe to use the other.</p>
<p>The decision could however be improved by also incorporating AOUT_MAX_PTS_DELAY to actually discard blocks that we need to shrink (resample over time) to a lower duration than AOUT_MAX_PTS_DELAY (ie. preferring silence instead of a longer period of resampling).</p>
<p>My experiments has however showed that the gain is neglectable with my sample tfiles (at least to the human ear), but in theory it could be an improvement.</p>