mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-01-18 20:46:43 +00:00
Fixed GetText to pleasure the unit test
This commit is contained in:
parent
1b2af5fd1f
commit
c05337562c
1 changed files with 8 additions and 2 deletions
|
@ -23,13 +23,19 @@ private FFMpegArguments() { }
|
|||
private string GetText()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
var appendSpace = false;
|
||||
|
||||
foreach (var arg in _globalArguments.Arguments.Concat(Arguments))
|
||||
{
|
||||
if (sb.Length != 0)
|
||||
if (appendSpace)
|
||||
{
|
||||
sb.Append(' ');
|
||||
}
|
||||
else
|
||||
{
|
||||
appendSpace = true;
|
||||
}
|
||||
|
||||
sb.Append(arg is IDynamicArgument dynArg ? dynArg.GetText(sb) : arg.Text);
|
||||
}
|
||||
|
||||
|
@ -99,4 +105,4 @@ internal void Post()
|
|||
argument.Post();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue