From 57cbb2930664d26fdd9b8b6624e2190ee07a2f20 Mon Sep 17 00:00:00 2001 From: redzic Date: Sun, 21 Nov 2021 20:32:17 -0600 Subject: [PATCH] Remove conditional compilation for ffmpeg concat The logic should actually be the same on all platforms, Linux still needs backslashes escaped with another backslash. --- av1an-core/src/concat.rs | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/av1an-core/src/concat.rs b/av1an-core/src/concat.rs index d9dcb49..283d90d 100644 --- a/av1an-core/src/concat.rs +++ b/av1an-core/src/concat.rs @@ -252,22 +252,13 @@ pub fn ffmpeg(temp: &Path, output: &Path) -> anyhow::Result<()> { let mut contents = String::with_capacity(24 * files.len()); for i in files { - if cfg!(windows) { - contents.push_str(&format!( - "file {}\n", - format!("{}", i.path().display()) - .replace(r"\", r"\\") - .replace(" ", r"\ ") - .replace("'", r"\'") - )); - } else { - contents.push_str(&format!( - "file {}\n", - format!("{}", i.path().display()) - .replace(" ", r"\ ") - .replace("'", r"\'") - )); - } + contents.push_str(&format!( + "file {}\n", + format!("{}", i.path().display()) + .replace(r"\", r"\\") + .replace(" ", r"\ ") + .replace("'", r"\'") + )); } let mut file = File::create(concat_file)?;