diff --git a/Cargo.lock b/Cargo.lock index 07982608..ad65a959 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -941,7 +941,7 @@ dependencies = [ [[package]] name = "ffplayout" -version = "0.14.1" +version = "0.14.2" dependencies = [ "chrono", "clap", diff --git a/ffplayout-engine/Cargo.toml b/ffplayout-engine/Cargo.toml index 7ba812a0..d0f3286a 100644 --- a/ffplayout-engine/Cargo.toml +++ b/ffplayout-engine/Cargo.toml @@ -4,7 +4,7 @@ description = "24/7 playout based on rust and ffmpeg" license = "GPL-3.0" authors = ["Jonathan Baecker jonbae77@gmail.com"] readme = "README.md" -version = "0.14.1" +version = "0.14.2" edition = "2021" [dependencies] @@ -38,6 +38,7 @@ priority = "optional" section = "net" license-file = ["../LICENSE", "0"] depends = "" +recommends = "sudo" suggests = "ffmpeg" copyright = "Copyright (c) 2022, Jonathan Baecker. All rights reserved." conf-files = ["/etc/ffplayout/ffplayout.yml"] diff --git a/ffplayout-engine/src/input/playlist.rs b/ffplayout-engine/src/input/playlist.rs index 719d75e6..7611b339 100644 --- a/ffplayout-engine/src/input/playlist.rs +++ b/ffplayout-engine/src/input/playlist.rs @@ -517,6 +517,15 @@ fn gen_source( node.add_filter(config, filter_chain); + if node.out - node.seek < 1.0 { + warn!( + "Clip is less then 1 second long, skip: <b><magenta>{}</></b>", + node.source + ); + + node.process = Some(false); + } + node } @@ -568,17 +577,6 @@ fn handle_list_end( if node.duration > total_delta && total_delta > 1.0 && node.duration - node.seek >= total_delta { node.out = out; - } else if node.duration > total_delta && total_delta < 1.0 { - warn!( - "Last clip less then 1 second long, skip: <b><magenta>{}</></b>", - node.source - ); - node.out = out; - node.cmd = Some(seek_and_length(&node)); - - node.process = Some(false); - - return node; } else { warn!("Playlist is not long enough: <yellow>{total_delta:.2}</> seconds needed"); }