spdif: Call end chan when process exit

This commit is contained in:
nemunaire 2024-11-23 10:30:17 +01:00
parent b22259c423
commit 7c0d1a8ca5

View File

@ -118,6 +118,7 @@ func (s *SPDIFSource) Enable() error {
} }
pipeW.Close() pipeW.Close()
s.endChan <- true
s.processRec = nil s.processRec = nil
}() }()
@ -131,7 +132,6 @@ func (s *SPDIFSource) Disable() error {
if s.processPlay != nil && s.processPlay.Process != nil { if s.processPlay != nil && s.processPlay.Process != nil {
s.processPlay.Process.Kill() s.processPlay.Process.Kill()
} }
s.endChan <- true
return nil return nil
} }