mirror of
https://github.com/datarhei/core.git
synced 2025-09-26 20:11:29 +08:00
Update dependencies
This commit is contained in:
2
go.mod
2
go.mod
@@ -10,7 +10,7 @@ require (
|
||||
github.com/atrox/haikunatorgo/v2 v2.0.1
|
||||
github.com/caddyserver/certmagic v0.20.0
|
||||
github.com/datarhei/gosrt v0.6.0
|
||||
github.com/datarhei/joy4 v0.0.0-20240229100136-43bcaf8ef5e7
|
||||
github.com/datarhei/joy4 v0.0.0-20240515122635-392a77dff12d
|
||||
github.com/go-playground/validator/v10 v10.19.0
|
||||
github.com/gobwas/glob v0.2.3
|
||||
github.com/golang-jwt/jwt/v5 v5.2.1
|
||||
|
4
go.sum
4
go.sum
@@ -28,8 +28,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHH
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/datarhei/gosrt v0.6.0 h1:HrrXAw90V78ok4WMIhX6se1aTHPCn82Sg2hj+PhdmGc=
|
||||
github.com/datarhei/gosrt v0.6.0/go.mod h1:fsOWdLSHUHShHjgi/46h6wjtdQrtnSdAQFnlas8ONxs=
|
||||
github.com/datarhei/joy4 v0.0.0-20240229100136-43bcaf8ef5e7 h1:MG5XQMTTDPcuvvRzc1c37QbwgDbYPhKmPFo9gSaPdBE=
|
||||
github.com/datarhei/joy4 v0.0.0-20240229100136-43bcaf8ef5e7/go.mod h1:Jcw/6jZDQQmPx8A7INEkXmuEF7E9jjBbSTfVSLwmiQw=
|
||||
github.com/datarhei/joy4 v0.0.0-20240515122635-392a77dff12d h1:pb2UfphyP0/aCBMRdearSQUuCCQZrzMh3R/BAff9/TY=
|
||||
github.com/datarhei/joy4 v0.0.0-20240515122635-392a77dff12d/go.mod h1:Jcw/6jZDQQmPx8A7INEkXmuEF7E9jjBbSTfVSLwmiQw=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
|
28
vendor/github.com/datarhei/joy4/format/rtmp/rtmp.go
generated
vendored
28
vendor/github.com/datarhei/joy4/format/rtmp/rtmp.go
generated
vendored
@@ -301,6 +301,7 @@ type chunkStream struct {
|
||||
msgdataleft uint32
|
||||
msghdrtype uint8
|
||||
msgdata []byte
|
||||
msgcount int
|
||||
}
|
||||
|
||||
func (cs *chunkStream) Start() {
|
||||
@@ -1521,28 +1522,33 @@ func (conn *Conn) readChunk() (err error) {
|
||||
timestamp = cs.timenow
|
||||
|
||||
if cs.msgtypeid == msgtypeidVideoMsg || cs.msgtypeid == msgtypeidAudioMsg {
|
||||
if !cs.gentimenow {
|
||||
if cs.prevtimenow >= cs.timenow {
|
||||
cs.tscount++
|
||||
} else {
|
||||
cs.tscount = 0
|
||||
if cs.msgcount < 20 { // only consider the first video and audio messages
|
||||
if !cs.gentimenow {
|
||||
if cs.prevtimenow >= cs.timenow {
|
||||
cs.tscount++
|
||||
} else {
|
||||
cs.tscount = 0
|
||||
}
|
||||
|
||||
// if the previous timestamp is the same as the current for too often in a row, assume defect timestamps
|
||||
if cs.tscount > 10 {
|
||||
cs.gentimenow = true
|
||||
}
|
||||
|
||||
cs.prevtimenow = cs.timenow
|
||||
}
|
||||
|
||||
if cs.tscount > 3 {
|
||||
cs.gentimenow = true
|
||||
}
|
||||
cs.msgcount++
|
||||
}
|
||||
|
||||
if cs.gentimenow {
|
||||
timestamp = uint32((time.Since(conn.start).Milliseconds() % 0xFFFFFFFF) & 0xFFFFFFFF)
|
||||
timestamp = uint32(time.Since(conn.start).Milliseconds() % 0xFFFFFFFF)
|
||||
}
|
||||
}
|
||||
|
||||
if err = conn.handleMsg(timestamp, cs.msgsid, cs.msgtypeid, cs.msgdata); err != nil {
|
||||
return fmt.Errorf("handleMsg: %w", err)
|
||||
}
|
||||
|
||||
cs.prevtimenow = cs.timenow
|
||||
}
|
||||
|
||||
conn.ackn += uint32(n)
|
||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@@ -61,7 +61,7 @@ github.com/datarhei/gosrt/crypto
|
||||
github.com/datarhei/gosrt/net
|
||||
github.com/datarhei/gosrt/packet
|
||||
github.com/datarhei/gosrt/rand
|
||||
# github.com/datarhei/joy4 v0.0.0-20240229100136-43bcaf8ef5e7
|
||||
# github.com/datarhei/joy4 v0.0.0-20240515122635-392a77dff12d
|
||||
## explicit; go 1.14
|
||||
github.com/datarhei/joy4/av
|
||||
github.com/datarhei/joy4/av/avutil
|
||||
|
Reference in New Issue
Block a user