Monibuca / plugin-hls

HLS协议的实现,提供HLS协议拉流,和HLS的写磁盘功能
MIT License
40 stars 40 forks source link

GB28181 H265 Stream writeHLS panic #6

Closed mtt0 closed 2 years ago

mtt0 commented 2 years ago

Description

panic location: v3@v3.0.5/write.go:175

2022/01/07 17:01:04 install plugin GateWay v3.0.5
2022/01/07 17:01:04 install plugin GB28181 v3.0.1
2022/01/07 17:01:04 install plugin HDL v3.4.4
2022/01/07 17:01:04 install plugin TS v3.0.0
2022/01/07 17:01:04 install plugin HLS v3.4.4
2022/01/07 17:01:04 install plugin Jessica v3.0.0-20210807235919-48ac5fbec646
2022/01/07 17:01:04 install plugin LogRotate v3.0.0-20210710104346-3db68431dcab
2022/01/07 17:01:04 install plugin Record v3.0.0-20210813073316-79dce1e0dc70
2022/01/07 17:01:04 install plugin RTMP v3.0.0
2022/01/07 17:01:04 install plugin RTSP v3.4.4
2022/01/07 17:01:04 install plugin Summary v0.0.0-20210821070131-2261e0efb7b9
2022/01/07 17:01:04 install plugin WebRTC v3.0.1
2022/01/07 17:01:04 Ⓜ starting m7s  v3.4.4
2022/01/07 17:01:04 server gb28181 start at :65008
start udp server at:  :65008
2022/01/07 17:01:04 HDL start at  :2020 
2022/01/07 17:01:04 server gateway start at  :65100 
2022/01/07 17:01:04 Jessica start at :65101 
2022/01/07 17:01:04 server rtmp start at :1935
2022/01/07 17:01:06 start report summary
invite response statuscode: 200
2022/01/07 17:01:49 Stream publish: 33010000001180000002/33010000191320000033
2022/01/07 17:01:49 subscribe :HLS HLSWriter,to Stream 33010000001180000002/33010000191320000033
2022/01/07 17:01:49 33010000001180000002/33010000191320000033 subscriber HLSWriter added remains:1
2022/01/07 17:01:54 33010000001180000002/33010000191320000033 subscriber HLSWriter removed remains:0
panic: interface conversion: interface {} is nil, not hls.PlaylistInf
goroutine 598 [running]:
github.com/Monibuca/plugin-hls/v3.writeHLS.func3(0x0, 0x0)
    /Users/k/go/pkg/mod/github.com/!monibuca/plugin-hls/v3@v3.0.5/write.go:175 +0xc9
container/ring.(*Ring).Do(0xc0006c01a0, 0x1019340)
    /usr/local/go/src/container/ring/ring.go:136 +0x46
github.com/Monibuca/plugin-hls/v3.writeHLS(0xc00000a1e0)
    /Users/k/go/pkg/mod/github.com/!monibuca/plugin-hls/v3@v3.0.5/write.go:174 +0xbca
reflect.Value.call(0xad0ea0, 0x1019348, 0x13, 0xbd748f, 0x4, 0xc0001d4c48, 0x1, 0x1, 0x0, 0x0, ...)
    /usr/local/go/src/reflect/value.go:476 +0x8e7
reflect.Value.Call(0xad0ea0, 0x1019348, 0x13, 0xc0001d4c48, 0x1, 0x1, 0x30, 0x7f8e9412fa68, 0x414ffb)
    /usr/local/go/src/reflect/value.go:337 +0xb9
reflect.Value.call(0xadf080, 0xc00061e220, 0x13, 0xbd748f, 0x4, 0xc0016f3098, 0x1, 0x1, 0x7f8e6d29d901, 0xc001613fc8, ...)
    /usr/local/go/src/reflect/value.go:476 +0x8e7
reflect.Value.Call(0xadf080, 0xc00061e220, 0x13, 0xc0016f3098, 0x1, 0x1, 0x0, 0xc000110ec8, 0x40db5b)
    /usr/local/go/src/reflect/value.go:337 +0xb9
created by github.com/Monibuca/engine/v3.(*RingBuffer).ReadLoopConditionalGo
    /Users/k/go/pkg/mod/github.com/!monibuca/engine/v3@v3.4.4/ring.go:170 +0x1ee

image

image

Environment

$ go version
go version go1.16.3 darwin/amd64

config.toml:

[Engine]
EnableAudio = false
EnableVideo = true
PublishTimeout = 60
[Summary]
SampleRate = 5
[RTMP]
ListenAddr = ":1935"
[GateWay]
ListenAddr = ":8081"
[Jessica]
ListenAddr = ":8080"
[LogRotate]
Path = "logs"
Size = 0
Days = 1
Formatter = "2006-01-02T15"
[Cluster]
ListenAddr = ":2019"
[HLS]
EnableWrite = false
EnableMemory = true
Fragment = 10
Window = 2
Path = "resource"
[HDL]
ListenAddr = ":2020"
[TS]
Path  = "resource"
[Record]
Path = "resource"
AutoRecord  = false
[RTSP]
ListenAddr = ":554"
Reconnect = true
[WebRTC]
[GB28181]
Serial = "34012345002000000110"
Realm = "3401234500"
Expires = 3600
ListenAddr = ":5010"
AutoCloseAfter = 60
AutoInvite = false
MediaPort = 65102
CatalogInterval = 300
RemoveBanInterval = 300
Username = ""
Password = ""
UdpCacheSize = 0
TCP = true
langhuihui commented 2 years ago

使用最新版本再试试