mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-08-04 07:02:58 +00:00
Use static regex
This commit is contained in:
parent
d6f3ca859e
commit
f3030812ea
1 changed files with 3 additions and 3 deletions
|
|
@ -139,9 +139,9 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
|
||||
var required = codec == Codec.Encoder ? requiredEncoders : requiredDecoders;
|
||||
|
||||
Regex regex = new Regex(@"^\s\S{6}\s(?<codec>[\w|-]+)\s+.+$", RegexOptions.Multiline);
|
||||
MatchCollection matches = regex.Matches(output);
|
||||
var found = matches.Cast<Match>()
|
||||
var found = Regex
|
||||
.Matches(output, @"^\s\S{6}\s(?<codec>[\w|-]+)\s+.+$", RegexOptions.Multiline)
|
||||
.Cast<Match>()
|
||||
.Select(x => x.Groups["codec"].Value)
|
||||
.Where(x => required.Contains(x));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue