Use static regex
This commit is contained in:
parent
d6f3ca859e
commit
f3030812ea
|
@ -139,9 +139,9 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||||
|
|
||||||
var required = codec == Codec.Encoder ? requiredEncoders : requiredDecoders;
|
var required = codec == Codec.Encoder ? requiredEncoders : requiredDecoders;
|
||||||
|
|
||||||
Regex regex = new Regex(@"^\s\S{6}\s(?<codec>[\w|-]+)\s+.+$", RegexOptions.Multiline);
|
var found = Regex
|
||||||
MatchCollection matches = regex.Matches(output);
|
.Matches(output, @"^\s\S{6}\s(?<codec>[\w|-]+)\s+.+$", RegexOptions.Multiline)
|
||||||
var found = matches.Cast<Match>()
|
.Cast<Match>()
|
||||||
.Select(x => x.Groups["codec"].Value)
|
.Select(x => x.Groups["codec"].Value)
|
||||||
.Where(x => required.Contains(x));
|
.Where(x => required.Contains(x));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user