Skip to content

Commit 41d88ee

Browse files
committed
Fix ffmpeg filter escaping
1 parent 84d46bb commit 41d88ee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

av1an-core/src/ffmpeg.rs

+4
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,15 @@ pub fn escape_path_in_filter(path: impl AsRef<Path>) -> String {
210210
// https://stackoverflow.com/questions/60440793/how-can-i-use-windows-absolute-paths-with-the-movie-filter-on-ffmpeg
211211
.replace('\\', "/")
212212
.replace(':', r"\\:")
213+
.replace('[', r"\[")
214+
.replace(']', r"\]")
213215
} else {
214216
PathAbs::new(path.as_ref())
215217
.unwrap()
216218
.to_str()
217219
.unwrap()
220+
.replace('[', r"\[")
221+
.replace(']', r"\]")
218222
.to_string()
219223
}
220224
.replace(',', "\\,")

0 commit comments

Comments
 (0)