diff --git a/ffplayout-frontend b/ffplayout-frontend index ec78765c..cb208173 160000 --- a/ffplayout-frontend +++ b/ffplayout-frontend @@ -1 +1 @@ -Subproject commit ec78765c0bfbe583ff9b5cbdcd6d011ecb89ac62 +Subproject commit cb20817330c5fd837eec1ae5716aa60f28f2b973 diff --git a/lib/src/filter/v_overlay.rs b/lib/src/filter/v_overlay.rs index f36cda42..ff122310 100644 --- a/lib/src/filter/v_overlay.rs +++ b/lib/src/filter/v_overlay.rs @@ -10,7 +10,7 @@ pub fn filter_node(config: &PlayoutConfig, add_tail: bool) -> String { return logo_chain; } - if let Some(fps) = config.processing.logo_fps.clone() { + if let Some(fps) = config.processing.logo_fps { let opacity = format!( "format=rgba,colorchannelmixer=aa={}", config.processing.logo_opacity diff --git a/lib/src/utils/config.rs b/lib/src/utils/config.rs index d95b8178..67c76340 100644 --- a/lib/src/utils/config.rs +++ b/lib/src/utils/config.rs @@ -91,7 +91,7 @@ pub struct Processing { pub logo: String, #[serde(skip_serializing, skip_deserializing)] - pub logo_fps: Option, + pub logo_fps: Option, pub logo_scale: String, pub logo_opacity: f32, @@ -232,9 +232,13 @@ impl PlayoutConfig { .video_streams .get(0) .and_then(|v| v.r_frame_rate.split_once('/')) - .map(|f| f.0) + .and_then(|f| { + f.0.parse::() + .ok() + .and_then(|x_num| f.1.parse::().ok().map(|y_num| x_num / y_num)) + }) { - config.processing.logo_fps = Some(fps.to_string()); + config.processing.logo_fps = Some(fps); }; }