From a0f76a4f1864af414211b6144a409549b144c884 Mon Sep 17 00:00:00 2001 From: Matthew Jackson <1085847+MattJackson@users.noreply.github.com> Date: Fri, 7 Aug 2026 02:45:57 -0700 Subject: [PATCH] Say how many DISTINCT feed spans a title's clips share A seamlessly branched title re-references one clip file from several PlayItems with different mark ranges, and those references share a single feed span because the bytes are read once. A byte offset alone cannot then tell them apart. Whether that is happening on a given title is the fact that decides whether provenance can identify a clip on its own, and it was not observable. distinct_spans < clips says it directly. --- src/mux/timeline.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/mux/timeline.rs b/src/mux/timeline.rs index 64b70e0..6f9a4d9 100644 --- a/src/mux/timeline.rs +++ b/src/mux/timeline.rs @@ -267,9 +267,25 @@ impl SeamPlan { // title that fell back to inference looked exactly like one the plan // handled, and telling them apart meant rebuilding and re-ripping. // Both flags, once, at plan construction. + // How many DISTINCT feed spans the clips share. A seamlessly branched + // title re-references one clip file from several PlayItems with + // different mark ranges, and those references share a single span + // (the bytes are read once), so a byte offset alone cannot tell them + // apart. `distinct < clips` is therefore the fact that decides whether + // provenance can identify a clip on its own. + let mut distinct_spans = 0usize; + let mut seen: Option<(u64, u64)> = None; + for c in &out { + if c.feed_span != seen { + distinct_spans += 1; + seen = c.feed_span; + } + } + tracing::info!( target: "freemkv::mux", clips = out.len(), + distinct_spans, spans_trusted, marks_orderable, total_ns = cum,