From c15166e1a5194f2b485181e886d9badb47828a74 Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Thu, 7 Jul 2022 22:32:01 +0200 Subject: [PATCH] tweak regex again --- lib/src/utils/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/utils/mod.rs b/lib/src/utils/mod.rs index 0a1c281d..fcfa347c 100644 --- a/lib/src/utils/mod.rs +++ b/lib/src/utils/mod.rs @@ -561,7 +561,7 @@ fn ffmpeg_libs_and_filter() -> (Vec, Vec) { let mut filters: Vec = vec![]; // filter lines which contains filter - let re: Regex = Regex::new(r"^ ?[TSC.]+").unwrap(); + let re: Regex = Regex::new(r"^[T.][S.][C.]").unwrap(); let mut ff_proc = match Command::new("ffmpeg") .arg("-filters") @@ -597,7 +597,7 @@ fn ffmpeg_libs_and_filter() -> (Vec, Vec) { // stdout shows filter help text // get filters for line in out_buffer.lines().flatten() { - if re.captures(line.as_str()).is_some() { + if re.captures(line.as_str().trim()).is_some() { let filter_line = line.split_whitespace(); filters.push(filter_line.collect::>()[1].to_string());