mirror of https://bitbucket.org/ausocean/av.git
defunct process fix
This commit is contained in:
parent
5b5d17ee87
commit
3f49f56ec5
|
@ -632,18 +632,7 @@ func (r *revid) setupInputForRaspivid() error {
|
|||
)
|
||||
}
|
||||
stdout, _ := r.cmd.StdoutPipe()
|
||||
err := r.cmd.Start()
|
||||
if err != nil {
|
||||
for i := 0; i < raspividNoOfTries; i++ {
|
||||
r.Log(Error, err.Error())
|
||||
err = r.cmd.Start()
|
||||
if err == nil {
|
||||
goto raspividSuccess
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
raspividSuccess:
|
||||
go r.cmd.Run()
|
||||
r.inputReader = bufio.NewReader(stdout)
|
||||
go r.readCamera()
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue