mirror of
https://github.com/aler9/rtsp-simple-server
synced 2025-10-06 08:06:58 +08:00
restore compatibility with non-raspberry arm systems (#1587)
This commit is contained in:
@@ -181,8 +181,6 @@ outer:
|
||||
p.ctxCancel()
|
||||
|
||||
p.closeResources(nil, false)
|
||||
|
||||
rpicamera.LibcameraCleanup()
|
||||
}
|
||||
|
||||
func (p *Core) createResources(initial bool) error {
|
||||
@@ -210,11 +208,6 @@ func (p *Core) createResources(initial bool) error {
|
||||
// do not check for errors
|
||||
rlimit.Raise()
|
||||
|
||||
err := rpicamera.LibcameraSetup()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
|
||||
p.externalCmdPool = externalcmd.NewPool()
|
||||
@@ -679,6 +672,10 @@ func (p *Core) closeResources(newConf *conf.Conf, calledByAPI bool) {
|
||||
p.externalCmdPool.Close()
|
||||
}
|
||||
|
||||
if newConf == nil {
|
||||
rpicamera.Cleanup()
|
||||
}
|
||||
|
||||
if closeLogger {
|
||||
p.logger.Close()
|
||||
p.logger = nil
|
||||
|
Reference in New Issue
Block a user