mirror of https://bitbucket.org/ausocean/av.git
Filters shall close when revid stops.
The Stop method for revid calls the filter's Close method to free filter resources.
This commit is contained in:
parent
cbe36f03b0
commit
7364174858
|
@ -65,7 +65,7 @@ func (m *MOGFilter) Close() error {
|
||||||
for _, window := range m.windows {
|
for _, window := range m.windows {
|
||||||
window.Close()
|
window.Close()
|
||||||
}
|
}
|
||||||
return m.dst.Close()
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Implements io.Writer.
|
// Implements io.Writer.
|
||||||
|
|
|
@ -450,6 +450,10 @@ func (r *Revid) Stop() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
r.cfg.Logger.Log(logger.Error, pkg+"failed to close pipeline", "error", err.Error())
|
r.cfg.Logger.Log(logger.Error, pkg+"failed to close pipeline", "error", err.Error())
|
||||||
}
|
}
|
||||||
|
err = r.filter.Close()
|
||||||
|
if err != nil {
|
||||||
|
r.cfg.Logger.Log(logger.Error, pkg+"failed to close pipeline", "error", err.Error())
|
||||||
|
}
|
||||||
r.cfg.Logger.Log(logger.Info, pkg+"closed pipeline")
|
r.cfg.Logger.Log(logger.Info, pkg+"closed pipeline")
|
||||||
|
|
||||||
if r.cmd != nil && r.cmd.Process != nil {
|
if r.cmd != nil && r.cmd.Process != nil {
|
||||||
|
|
Loading…
Reference in New Issue