Added ffmpeg check in VideoWriter
This commit is contained in:
parent
c03552383a
commit
b647a774cd
3 changed files with 6 additions and 2 deletions
4
utils.go
4
utils.go
|
@ -91,13 +91,13 @@ func parseDevices(buffer []byte) []string {
|
|||
devices := make([]string, 0)
|
||||
bufferstr := string(buffer)
|
||||
|
||||
index := strings.Index(bufferstr, "DirectShow video devices")
|
||||
index := strings.Index(bufferstr, "DirectShow video device")
|
||||
if index == -1 {
|
||||
return devices
|
||||
}
|
||||
bufferstr = bufferstr[index:]
|
||||
|
||||
index = strings.Index(bufferstr, "DirectShow audio devices")
|
||||
index = strings.Index(bufferstr, "DirectShow audio device")
|
||||
if index != -1 {
|
||||
bufferstr = bufferstr[:index]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue