From 76b33856365c05d0beb53752d38e7dd82fc59b26 Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Tue, 26 Jul 2022 11:18:09 +0200 Subject: [PATCH] no speed change when seek in clip --- lib/src/filter/mod.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/src/filter/mod.rs b/lib/src/filter/mod.rs index b4722b48..ade4edc5 100644 --- a/lib/src/filter/mod.rs +++ b/lib/src/filter/mod.rs @@ -275,18 +275,18 @@ fn realtime_filter( config: &PlayoutConfig, codec_type: &str, ) { - let mut t = ""; - - if codec_type == "audio" { - t = "a" - } - if config.general.generate.is_none() && &config.out.mode.to_lowercase() == "hls" { + let mut t = ""; + + if codec_type == "audio" { + t = "a" + } + let mut speed_filter = format!("{t}realtime=speed=1"); let (delta, _) = get_delta(config, &node.begin.unwrap()); - let duration = node.out - node.seek; - if delta < 0.0 { + if delta < 0.0 && node.seek == 0.0 { + let duration = node.out - node.seek; let speed = duration / (duration + delta); if speed > 0.0 && speed < 1.1 && delta < config.general.stop_threshold {