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) => {
|
streams.forEach((stream) => {
|
||||||
try{
|
try{
|
||||||
const codecType = stream.codec_type || 'video'
|
const codecType = stream.codec_type || 'video'
|
||||||
|
if(!streamIndex[codecType])streamIndex[codecType] = []
|
||||||
const simpleInfo = {
|
const simpleInfo = {
|
||||||
fps: eval(stream.r_frame_rate) || '',
|
fps: eval(stream.r_frame_rate) || '',
|
||||||
width: stream.coded_width,
|
width: stream.coded_width,
|
||||||
|
|
|
@ -71,6 +71,9 @@ module.exports = (s,config,lang) => {
|
||||||
if(activeMonitor.childNode){
|
if(activeMonitor.childNode){
|
||||||
s.cx({f:'kill',d:s.cleanMonitorObject(e)},activeMonitor.childNodeId)
|
s.cx({f:'kill',d:s.cleanMonitorObject(e)},activeMonitor.childNodeId)
|
||||||
}else{
|
}else{
|
||||||
|
try{
|
||||||
|
proc.stdin.write("q\r\n")
|
||||||
|
setTimeout(() => {
|
||||||
if(proc && proc.kill){
|
if(proc && proc.kill){
|
||||||
if(s.isWin){
|
if(s.isWin){
|
||||||
spawn("taskkill", ["/pid", proc.pid, '/t'])
|
spawn("taskkill", ["/pid", proc.pid, '/t'])
|
||||||
|
@ -85,6 +88,10 @@ module.exports = (s,config,lang) => {
|
||||||
}
|
}
|
||||||
},1000)
|
},1000)
|
||||||
}
|
}
|
||||||
|
},1000)
|
||||||
|
}catch(err){
|
||||||
|
s.debugLog(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue