viser v0.8.1
Robustness, safety, and interrupt-handling fixes for long-running per-title/per-shot/per-segment analyses.
Fixed
- Float NaN/Inf panics in ordering — all
f64::partial_cmp(...).unwrap()sites (convex hull construction, ladder selection, BD-rate, dip sorting, test invariants) replaced withf64::total_cmp. Added non-empty guards and filtering improvements aroundfirst()/last()after sorts. - Checkpoint mutex poisoning — replaced
std::sync::Mutexwithparking_lot::Mutex. All lock sites are now infallible; previous poison-recoveryunwrap_or_elseremoved. - Fragile Arc ownership after parallel joins — replaced
Arc::try_unwrap(...).unwrap().into_inner()withArc::into_inner(...).expect(...)(per-title analysis). - Two-pass passlog leaks —
PasslogCleanupnow implementsDropso ffmpeg two-pass log files are always cleaned, even on error,?return, or panic. Manualcleanup.run()call removed. - Per-segment parallelism ignored config —
per-segment analyzenow respectsConfig.parallel(and the new--parallelCLI flag); previously always hardcodedavailable_parallelism(). - Worker tasks survived cancellation — converted per-title, per-shot, and per-segment parallel loops to
tokio::task::JoinSet. Dropping the set aborts in-flight tasks. - No graceful Ctrl-C handling — top-level command dispatch now uses
tokio::select!onctrl_c(). Interrupt drops futures (triggering all RAII), aborts JoinSet tasks, and prints checkpoint resume guidance. Addedsignalfeature to tokio inviser-cli.
Changed
viser-checkpointdepends onparking_lot = "0.12".- Semaphore acquires and guarded
last_mutaccesses in shot detection now use descriptive.expect(...).