mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
Fixed single quotes escape in subtitle file path
Former-commit-id: 975bd75c5d
This commit is contained in:
parent
21da31c4c1
commit
0c74351d83
2 changed files with 7 additions and 7 deletions
|
@ -353,10 +353,10 @@ public void Builder_BuildString_SubtitleHardBurnFilterFixedPaths()
|
||||||
.OutputToFile("output.mp4", false, opt => opt
|
.OutputToFile("output.mp4", false, opt => opt
|
||||||
.WithVideoFilters(filterOptions => filterOptions
|
.WithVideoFilters(filterOptions => filterOptions
|
||||||
.HardBurnSubtitle(SubtitleHardBurnOptions
|
.HardBurnSubtitle(SubtitleHardBurnOptions
|
||||||
.Create(subtitlePath: @"sample( \ : [ ] , ).srt"))))
|
.Create(subtitlePath: @"sample( \ : [ ] , ' ).srt"))))
|
||||||
.Arguments;
|
.Arguments;
|
||||||
|
|
||||||
Assert.AreEqual(@"-i ""input.mp4"" -vf ""subtitles='sample( \\ \: \[ \] \, ).srt'"" ""output.mp4""",
|
Assert.AreEqual(@"-i ""input.mp4"" -vf ""subtitles='sample( \\ \: \[ \] \, '\\\'' ).srt'"" ""output.mp4""",
|
||||||
str);
|
str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ internal static class StringExtensions
|
||||||
{ ':', @"\:" },
|
{ ':', @"\:" },
|
||||||
{ '[', @"\[" },
|
{ '[', @"\[" },
|
||||||
{ ']', @"\]" },
|
{ ']', @"\]" },
|
||||||
// {'\'', @"\'"} TODO: Quotes need to be escaped but i failed miserably
|
{ '\'', @"'\\\''" }
|
||||||
};
|
};
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in a new issue