diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2020-07-23 18:07:01 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-23 18:07:01 -0400 |
| commit | 6f2b23b3df25077bb0630646b363854617e80b68 (patch) | |
| tree | a3151297d1b168f0551c69a2d8fe68c8ac615cab /MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs | |
| parent | 0d446c8755ab5688eb9c582b478c6b3f42cd7942 (diff) | |
| parent | e98351b9128670abf12976af735cfb40d40be36d (diff) | |
Merge pull request #3613 from Bond-009/regex
Replace \d with [0-9] in ffmpeg detection and scan code
Diffstat (limited to 'MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs')
| -rw-r--r-- | MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs index 0fd0239b4..5c43fdcfa 100644 --- a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs +++ b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs @@ -198,7 +198,7 @@ namespace MediaBrowser.MediaEncoding.Encoder internal static Version GetFFmpegVersion(string output) { // For pre-built binaries the FFmpeg version should be mentioned at the very start of the output - var match = Regex.Match(output, @"^ffmpeg version n?((?:\d+\.?)+)"); + var match = Regex.Match(output, @"^ffmpeg version n?((?:[0-9]+\.?)+)"); if (match.Success) { @@ -225,7 +225,7 @@ namespace MediaBrowser.MediaEncoding.Encoder var rc = new StringBuilder(144); foreach (Match m in Regex.Matches( output, - @"((?<name>lib\w+)\s+(?<major>\d+)\.\s*(?<minor>\d+))", + @"((?<name>lib\w+)\s+(?<major>[0-9]+)\.\s*(?<minor>[0-9]+))", RegexOptions.Multiline)) { rc.Append(m.Groups["name"]) |
