bluenviron / mediamtx

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
MIT License
11.41k stars 1.45k forks source link

SIGSEGV streaming from DJI drone #1819

Closed nigelsim closed 1 year ago

nigelsim commented 1 year ago

Which version are you using?

v0.23.0

Which operating system are you using?

Describe the issue

When publishing an RTMP stream from the DJI Mavic 3 the server crashes. This publishes OK to the nginx mod rtmp.

My speculation is that this because the stream only has video.

Describe how to replicate the issue

  1. start the server
  2. publish from the drone
  3. Crash

Did you attach the server logs?

2023/05/18 02:51:16 INF MediaMTX / rtsp-simple-server v0.23.0
2023/05/18 02:51:16 INF [RTSP] listener opened on :8554 (TCP)
2023/05/18 02:51:16 INF [RTMP] listener opened on :1935
2023/05/18 02:51:16 INF [HLS] listener opened on :8888
2023/05/18 02:51:16 INF [WebRTC] listener opened on :8889 (HTTP)
2023/05/18 02:51:17 INF [RTMP] [conn 192.168.0.154:49760] opened
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x9d5c80]

goroutine 82 [running]:
github.com/bluenviron/gortsplib/v3/pkg/formats.(*MPEG4AudioGeneric).ClockRate(0xd87ac0?)
    /go/pkg/mod/github.com/bluenviron/gortsplib/v3@v3.6.2/pkg/formats/mpeg4_audio_generic.go:108
github.com/bluenviron/gortsplib/v3.newServerStreamMedia(0xc000546b40, 0xc000534b40, 0x1)
    /go/pkg/mod/github.com/bluenviron/gortsplib/v3@v3.6.2/server_stream_media.go:34 +0x18a
github.com/bluenviron/gortsplib/v3.NewServerStream({0xc0001acd20, 0x2, 0x2})
    /go/pkg/mod/github.com/bluenviron/gortsplib/v3@v3.6.2/server_stream.go:42 +0x129
github.com/bluenviron/mediamtx/internal/core.newStream(0x0?, {0xc0001acd20?, 0x0?, 0x0?}, 0x0?, 0xc0001d9880, {0x7f9ed1090fe8, 0xc0004b0000})
    /s/internal/core/stream.go:30 +0x5e
github.com/bluenviron/mediamtx/internal/core.(*path).sourceSetReady(0xc00062c000, {0xc0001acd20?, 0x0?, 0x0?}, 0x0?)
    /s/internal/core/path.go:641 +0x45
github.com/bluenviron/mediamtx/internal/core.(*path).handlePublisherStart(0xc00062c000, {{0xf6d7a0, 0xc0004b0000}, {0xc0001acd20, 0x2, 0x2}, 0x1, 0xc00008d380})
    /s/internal/core/path.go:795 +0x14b
github.com/bluenviron/mediamtx/internal/core.(*path).run.func2(0xc00062c000)
    /s/internal/core/path.go:473 +0xc98
github.com/bluenviron/mediamtx/internal/core.(*path).run(0xc00062c000)
    /s/internal/core/path.go:499 +0x345
created by github.com/bluenviron/mediamtx/internal/core.newPath
    /s/internal/core/path.go:296 +0x756

Did you attach a network dump?

yes

dji-rtmp.zip

aler9 commented 1 year ago

Fixed in in v0.23.1

github-actions[bot] commented 9 months ago

This issue is being locked automatically because it has been closed for more than 6 months. Please open a new issue in case you encounter a similar problem.