revid/webcam.go: fixed error messages in Webcam.Stop

This commit is contained in:
Saxon 2019-11-06 11:31:12 +10:30
parent a02ea397d5
commit 9a93e92b50
1 changed files with 2 additions and 2 deletions

View File

@ -131,11 +131,11 @@ func (w *Webcam) Start() error {
// Stop will kill the ffmpeg process and close the output pipe.
func (w *Webcam) Stop() error {
if w.cmd == nil || w.cmd.Process == nil {
return errors.New("raspivid process was never started")
return errors.New("ffmpeg process was never started")
}
err := w.cmd.Process.Kill()
if err != nil {
return fmt.Errorf("could not kill raspivid process: %w", err)
return fmt.Errorf("could not kill ffmpeg process: %w", err)
}
return w.out.Close()
}