Merge pull request #177 from jb-alvarado/master

This commit is contained in:
jb-alvarado 2022-08-19 06:57:04 +02:00 committed by GitHub
commit c0fe0aea38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 13 deletions

2
Cargo.lock generated
View File

@ -941,7 +941,7 @@ dependencies = [
[[package]]
name = "ffplayout"
version = "0.14.1"
version = "0.14.2"
dependencies = [
"chrono",
"clap",

View File

@ -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"]

View File

@ -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");
}