Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTSP publish causing panic/runtime error #2378

Closed
1 of 13 tasks
dbussert opened this issue Sep 20, 2023 · 3 comments · Fixed by #2381
Closed
1 of 13 tasks

RTSP publish causing panic/runtime error #2378

dbussert opened this issue Sep 20, 2023 · 3 comments · Fixed by #2381
Labels
bug Something isn't working general

Comments

@dbussert
Copy link

Which version are you using?

v1.1.0

Which operating system are you using?

  • Linux amd64 standard
  • Linux amd64 Docker
  • Linux arm64 standard
  • Linux arm64 Docker
  • Linux arm7 standard
  • Linux arm7 Docker
  • Linux arm6 standard
  • Linux arm6 Docker
  • Windows amd64 standard
  • Windows amd64 Docker (WSL backend)
  • macOS amd64 standard
  • macOS amd64 Docker
  • Other (please describe)

Describe the issue

Error publishing an RTSP stream to v1.1.0 panic: runtime error: index out of range [0] with length 0. This same video source has been used with mediamtx v1.0.3 and back to rtsp-simple-server and always worked fine

Describe how to replicate the issue

  1. start the server
  2. publish with ffmpeg
  3. observe the logs

Did you attach the server logs?

yes

2023/09/20 03:12:32 INF [RTSP] [session 4056da8d] is publishing to path '78067a492b07293b4467579110533cdc', 2 tracks (H265, MPEG-4 Audio)
panic: runtime error: index out of range [0] with length 0
compass-rtsp-server_1  |
goroutine 80 [running]:
github.com/bluenviron/mediamtx/internal/formatprocessor.rtpH265ExtractVPSSPSPPS({0xc000326ccc?, 0xc000514a58?, 0x4103a5?})
       /build/mediamtx/internal/formatprocessor/h265.go:58 +0x248
github.com/bluenviron/mediamtx/internal/formatprocessor.(*formatProcessorH265).updateTrackParametersFromRTPPacket(0xc0003806a0, {0xc000326ccc?, 0x0?, 0x0?})
       /build/mediamtx/internal/formatprocessor/h265.go:122 +0x38
github.com/bluenviron/mediamtx/internal/formatprocessor.(*formatProcessorH265).ProcessRTPPacket(0xc0003806a0, 0xc00017f950, {0xc000514c38?, 0x411784?, 0x1681de0?}, 0x1e8f508b, 0x0)
       /build/mediamtx/internal/formatprocessor/h265.go:271 +0x145
github.com/bluenviron/mediamtx/internal/stream.(*streamFormat).writeRTPPacket(0xc0000192c0, 0xc000019260?, 0xc0000029c0?, 0x1e8f508b?, {0x15f90?, 0xad08b?, 0x1681de0?}, 0xa02d20?)
       /build/mediamtx/internal/stream/stream_format.go:78 +0x63
github.com/bluenviron/mediamtx/internal/stream.(*Stream).WriteRTPPacket(0xc00070ca40, 0xc0000029c0, {0xfff2b8, 0xc0001c20e0}, 0xc0003be028?, {0x1681de0?, 0x0?, 0x1681de0?}, 0xa03a40?)
       /build/mediamtx/internal/stream/stream.go:147 +0x12f
github.com/bluenviron/mediamtx/internal/core.(*rtspSession).onRecord.func1(0xc0003be000?)
       /build/mediamtx/internal/core/rtsp_session.go:370 +0x88
github.com/bluenviron/gortsplib/v4.(*serverSessionFormat).readRTPTCP(0xc00070c880, 0xc00017f950)
       /go/pkg/mod/github.com/bluenviron/gortsplib/v4@v4.1.0/server_session_format.go:98 +0x130
github.com/bluenviron/gortsplib/v4.(*serverSessionMedia).readRTPTCPRecord(0xc000488a80, {0xc000326cc0, 0x5d, 0x5d})
       /go/pkg/mod/github.com/bluenviron/gortsplib/v4@v4.1.0/server_session_media.go:285 +0x85
github.com/bluenviron/gortsplib/v4.(*serverConnReader).readFuncTCP(0xc0000358e0)
       /go/pkg/mod/github.com/bluenviron/gortsplib/v4@v4.1.0/server_conn_reader.go:126 +0x315
github.com/bluenviron/gortsplib/v4.(*serverConnReader).run(0xc0000358e0)
       /go/pkg/mod/github.com/bluenviron/gortsplib/v4@v4.1.0/server_conn_reader.go:51 +0x84
created by github.com/bluenviron/gortsplib/v4.newServerConnReader in goroutine 79
       /go/pkg/mod/github.com/bluenviron/gortsplib/v4@v4.1.0/server_conn_reader.go:36 +0xa9

Did you attach a network dump?

no

aler9 added a commit that referenced this issue Sep 20, 2023
@aler9 aler9 added bug Something isn't working general labels Sep 20, 2023
@aler9
Copy link
Member

aler9 commented Sep 20, 2023

Thanks for reporting the issue, this is fixed by #2381

@aler9
Copy link
Member

aler9 commented Sep 24, 2023

Fixed in v1.1.1

@aler9 aler9 mentioned this issue Oct 30, 2023
13 tasks
Copy link
Contributor

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.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working general
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants