From: Kostya Shishkov Date: Thu, 5 Feb 2026 17:24:21 +0000 (+0100) Subject: add options to test seeking more extensively X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=0e65416e6e9c966d543566afde0b584070638803;p=nihav-tool.git add options to test seeking more extensively --- diff --git a/src/main.rs b/src/main.rs index 94ec5d5..a4ad150 100644 --- a/src/main.rs +++ b/src/main.rs @@ -100,6 +100,7 @@ fn main() { let mut nmode = NumberMode::FrmPTS; let mut smode = FrameSkipMode::None; let mut seek_time = NATimePoint::None; + let mut seek_error_out = false; let mut vpfx: Option = None; let mut apfx: Option<&str> = None; let mut ignore_errors = false; @@ -131,6 +132,10 @@ fn main() { } seek_time = ret.unwrap(); }, + "-force_seek" => { + demux_opts.push(NAOption{name: FORCE_SEEK_OPTION, value: NAValue::Bool(true) }); + }, + "-seek_err" => { seek_error_out = true; }, "-apfx" => { cur_arg += 1; if cur_arg == args.len() { @@ -205,6 +210,9 @@ fn main() { let ret = demuxer.seek(seek_time); if ret.is_err() { println!(" seek error {:?}", ret.err().unwrap()); + if seek_error_out { + return; + } } }