fixed a potential problem

This commit is contained in:
Unknown 2018-03-14 20:06:28 +10:30
parent 1f9a14a0ee
commit f1f7235fa5
1 changed files with 7 additions and 7 deletions

View File

@ -128,6 +128,13 @@ func NewRevidInstance(config Config) (r *revidInst, err error) {
go r.packClips()
r.Log(Info, "New revid instance created! config is:")
r.Log(Info, fmt.Sprintf("%v", r.config))
if r.setupOutput != nil {
err := r.setupOutput()
if err != nil {
r.Log(Error, "Output setup didn't work!")
return
}
}
return
}
@ -228,13 +235,6 @@ func (r *revidInst) Start() {
return
}
r.Log(Info, "Starting Revid!")
if r.setupOutput != nil {
err := r.setupOutput()
if err != nil {
r.Log(Error, "Output setup didn't work!")
return
}
}
go r.setupInput()
go r.outputClips()
r.isRunning = true