<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
<title></title>
<style type="text/css">code{white-space: pre;}</style>
</head>
<body>
<p>Hi Steve,</p>
<ul>
<li>Could you provide samples, where the decision to have non-finite clusters is justifiable, that break with the proposed (and already merged) changes?</li>
</ul>
<p>On 2016-11-02 11:08, Steve Lhomme wrote:</p>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> Again, you're setting aside half of the other cases: files with finite
size and no Cues. The same piece of code to try to find the duration
will be applied. So at the very least if you don't want to bother
looking for the duration for these files then forbid it for these too.</code></pre>
</blockquote>
<p>I am not setting that aside, not at all.</p>
<p>If the file has no cues, not metadata that express the duration of the file, and has non-finite clusters that we need to walk through (all of them) in order to find the duration I think it makes more sense to simply say <em>“hey, this file has no duration which I feel like looking for - you can play it, but you will not have a duration”</em>.</p>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> And what about a file that would have one Cluster, a finite size, Cues
(1 Cluster is easy) and 1GB of Blocks in that Cluster ? It will also
take forever to parse just to find the last duration of the unique
Cluster. We might as well remove EnsureDuration().</code></pre>
</blockquote>
<p>That is not at all the same as semantically saying that we do not probe non-finite clusters for their duration.</p>
<p>Having a cluster with <em>N</em> gigabytes blocks is b0rked and has no true rationale behind it, but having a stream with clusters of unknown size has valid applications (and these valid applications do not play well with “finite duration” in either case).</p>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> Looking at the code, the Cluster duration is used only for
VirtualSegments, ie for chaining segments. But that duration, is also
used for seeking.
f_duration = p_current_vsegment->Duration();
if( p_sys->f_duration < 0 )
{
msg_Warn( p_demux, "cannot seek without duration!");
return;
}
We won't be able to seek in these files at all. It seems harsh to
forbid seeking for these files by default (maybe not the one with a
single huge Cluster). An option to disable the duration check is some
case might be useful though. There's already the `b_preparsing` flag
we could use to skip this. It may be renamed to something more generic
like b_skip_long_unnecessary_operations.</code></pre>
</blockquote>
<p>You are disregarding the fact that it will <em>only</em> happen for files where non-finite clusters are used, and most files have finite clusters (as non-finite clusters are generally only used when content is streamed).</p>
</body>
</html>