Make ffmpeg version detection more robust
This commit is contained in:
parent
3535f527fb
commit
28a75f23f7
@ -310,7 +310,7 @@ func version(binary string) (ffmpeg, error) {
|
||||
func parseVersion(data []byte) ffmpeg {
|
||||
f := ffmpeg{}
|
||||
|
||||
reVersion := regexp.MustCompile(`(?m)^ffmpeg version ([0-9]+\.[0-9]+(\.[0-9]+)?)`)
|
||||
reVersion := regexp.MustCompile(`(?m)^ffmpeg version (?:ffmpeg-)?([0-9]+\.[0-9]+(\.[0-9]+)?)`)
|
||||
reCompiler := regexp.MustCompile(`(?m)^\s*built with (.*)$`)
|
||||
reConfiguration := regexp.MustCompile(`(?m)^\s*configuration: (.*)$`)
|
||||
reLibrary := regexp.MustCompile(`(?m)^\s*(lib(?:[a-z]+))\s+([0-9]+\.\s*[0-9]+\.\s*[0-9]+) /\s+([0-9]+\.\s*[0-9]+\.\s*[0-9]+)`)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user