Update dependencies

This commit is contained in:
Ingo Oppermann
2024-05-15 14:59:04 +02:00
parent 4739958e12
commit e271a0257b
4 changed files with 21 additions and 15 deletions

2
go.mod
View File

@@ -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
View File

@@ -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=

View File

@@ -301,6 +301,7 @@ type chunkStream struct {
msgdataleft uint32
msghdrtype uint8
msgdata []byte
msgcount int
}
func (cs *chunkStream) Start() {
@@ -1521,6 +1522,7 @@ func (conn *Conn) readChunk() (err error) {
timestamp = cs.timenow
if cs.msgtypeid == msgtypeidVideoMsg || cs.msgtypeid == msgtypeidAudioMsg {
if cs.msgcount < 20 { // only consider the first video and audio messages
if !cs.gentimenow {
if cs.prevtimenow >= cs.timenow {
cs.tscount++
@@ -1528,21 +1530,25 @@ func (conn *Conn) readChunk() (err error) {
cs.tscount = 0
}
if cs.tscount > 3 {
// 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
}
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
View File

@@ -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