Fix Reolink RTMP restart bug, fix undefined codec array
parent
ad27f9ee2f
commit
40d172e52c
|
@ -81,6 +81,7 @@ module.exports = (s,config,lang) => {
|
|||
streams.forEach((stream) => {
|
||||
try{
|
||||
const codecType = stream.codec_type || 'video'
|
||||
if(!streamIndex[codecType])streamIndex[codecType] = []
|
||||
const simpleInfo = {
|
||||
fps: eval(stream.r_frame_rate) || '',
|
||||
width: stream.coded_width,
|
||||
|
|
|
@ -71,19 +71,26 @@ module.exports = (s,config,lang) => {
|
|||
if(activeMonitor.childNode){
|
||||
s.cx({f:'kill',d:s.cleanMonitorObject(e)},activeMonitor.childNodeId)
|
||||
}else{
|
||||
if(proc && proc.kill){
|
||||
if(s.isWin){
|
||||
spawn("taskkill", ["/pid", proc.pid, '/t'])
|
||||
}else{
|
||||
proc.kill('SIGTERM')
|
||||
}
|
||||
setTimeout(function(){
|
||||
try{
|
||||
proc.kill()
|
||||
}catch(err){
|
||||
s.debugLog(err)
|
||||
try{
|
||||
proc.stdin.write("q\r\n")
|
||||
setTimeout(() => {
|
||||
if(proc && proc.kill){
|
||||
if(s.isWin){
|
||||
spawn("taskkill", ["/pid", proc.pid, '/t'])
|
||||
}else{
|
||||
proc.kill('SIGTERM')
|
||||
}
|
||||
setTimeout(function(){
|
||||
try{
|
||||
proc.kill()
|
||||
}catch(err){
|
||||
s.debugLog(err)
|
||||
}
|
||||
},1000)
|
||||
}
|
||||
},1000)
|
||||
}catch(err){
|
||||
s.debugLog(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue