mirror of
https://github.com/bluenviron/mediamtx
synced 2025-02-10 00:18:22 +00:00
update gortsplib
This commit is contained in:
parent
d0e8d00616
commit
2de0941e5c
2
go.mod
2
go.mod
@ -5,7 +5,7 @@ go 1.18
|
||||
require (
|
||||
code.cloudfoundry.org/bytefmt v0.0.0
|
||||
github.com/abema/go-mp4 v0.0.0
|
||||
github.com/aler9/gortsplib/v2 v2.0.1
|
||||
github.com/aler9/gortsplib/v2 v2.0.3
|
||||
github.com/asticode/go-astits v1.10.1-0.20220319093903-4abe66a9b757
|
||||
github.com/fsnotify/fsnotify v1.4.9
|
||||
github.com/gin-gonic/gin v1.8.1
|
||||
|
4
go.sum
4
go.sum
@ -4,8 +4,8 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2c
|
||||
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
|
||||
github.com/aler9/go-mp4 v0.0.0-20221229200349-f3d01e787968 h1:wU8pLx4dc8bLB+JuVPWuGp+BoMkOabj98a0RmO3gqvw=
|
||||
github.com/aler9/go-mp4 v0.0.0-20221229200349-f3d01e787968/go.mod h1:vPl9t5ZK7K0x68jh12/+ECWBCXoWuIDtNgPtU2f04ws=
|
||||
github.com/aler9/gortsplib/v2 v2.0.1 h1:qhuyclmBdyOcL6vhZg0QAvecStWHg+K8+2G9bzGhyGw=
|
||||
github.com/aler9/gortsplib/v2 v2.0.1/go.mod h1:lMdAxc6daduSzVwh75yQkvH9UHCYHpng/vJ8uXKFzdA=
|
||||
github.com/aler9/gortsplib/v2 v2.0.3 h1:sOf4Le/KohNS6bAXr7LzvmJA9AHPpLKHmdJztK+UaNU=
|
||||
github.com/aler9/gortsplib/v2 v2.0.3/go.mod h1:cGD/4JW43Elv/f4HfNBdH78IO5ZfwZIY52fByVASmsU=
|
||||
github.com/aler9/writerseeker v0.0.0-20220601075008-6f0e685b9c82 h1:9WgSzBLo3a9ToSVV7sRTBYZ1GGOZUpq4+5H3SN0UZq4=
|
||||
github.com/aler9/writerseeker v0.0.0-20220601075008-6f0e685b9c82/go.mod h1:qsMrZCbeBf/mCLOeF16KDkPu4gktn/pOWyaq1aYQE7U=
|
||||
github.com/asticode/go-astikit v0.20.0 h1:+7N+J4E4lWx2QOkRdOf6DafWJMv6O4RRfgClwQokrH8=
|
||||
|
@ -596,32 +596,13 @@ func (c *rtmpConn) runPublish(ctx context.Context, u *url.URL) error {
|
||||
return fmt.Errorf("received a video packet, but track is not set up")
|
||||
}
|
||||
|
||||
nalus, err := h264.AVCCUnmarshal(tmsg.Payload)
|
||||
au, err := h264.AVCCUnmarshal(tmsg.Payload)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to decode AVCC: %v", err)
|
||||
}
|
||||
|
||||
// skip invalid NALUs sent by DJI
|
||||
n := 0
|
||||
for _, nalu := range nalus {
|
||||
if len(nalu) != 0 {
|
||||
n++
|
||||
}
|
||||
}
|
||||
if n == 0 {
|
||||
c.log(logger.Warn, "unable to decode AVCC: %v", err)
|
||||
continue
|
||||
}
|
||||
|
||||
validNALUs := make([][]byte, n)
|
||||
pos := 0
|
||||
for _, nalu := range nalus {
|
||||
if len(nalu) != 0 {
|
||||
validNALUs[pos] = nalu
|
||||
pos++
|
||||
}
|
||||
}
|
||||
|
||||
onVideoData(tmsg.DTS+tmsg.PTSDelta, validNALUs)
|
||||
onVideoData(tmsg.DTS+tmsg.PTSDelta, au)
|
||||
}
|
||||
|
||||
case *message.MsgAudio:
|
||||
|
@ -179,7 +179,8 @@ func (s *rtmpSource) run(ctx context.Context) error {
|
||||
|
||||
au, err := h264.AVCCUnmarshal(tmsg.Payload)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to decode AVCC: %v", err)
|
||||
s.Log(logger.Warn, "unable to decode AVCC: %v", err)
|
||||
continue
|
||||
}
|
||||
|
||||
err = res.stream.writeData(videoMedia, videoFormat, &formatprocessor.DataH264{
|
||||
|
Loading…
Reference in New Issue
Block a user