1
0
Fork 0
forked from External/mediamtx

webrtc, hls: use absolute paths in Location header (#3195) (#3177) (#3240)

This commit is contained in:
Alessandro Ros 2024-04-14 12:04:51 +02:00 committed by GitHub
parent a18bebfa58
commit 665e11a376
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 62 additions and 111 deletions

View file

@ -150,6 +150,7 @@ type webRTCAddSessionCandidatesRes struct {
}
type webRTCAddSessionCandidatesReq struct {
pathName string
secret uuid.UUID
candidates []*pwebrtc.ICECandidateInit
res chan webRTCAddSessionCandidatesRes
@ -160,8 +161,9 @@ type webRTCDeleteSessionRes struct {
}
type webRTCDeleteSessionReq struct {
secret uuid.UUID
res chan webRTCDeleteSessionRes
pathName string
secret uuid.UUID
res chan webRTCDeleteSessionRes
}
type serverPathManager interface {
@ -343,7 +345,7 @@ outer:
case req := <-s.chAddSessionCandidates:
sx, ok := s.sessionsBySecret[req.secret]
if !ok {
if !ok || sx.req.pathName != req.pathName {
req.res <- webRTCAddSessionCandidatesRes{err: ErrSessionNotFound}
continue
}
@ -352,7 +354,7 @@ outer:
case req := <-s.chDeleteSession:
sx, ok := s.sessionsBySecret[req.secret]
if !ok {
if !ok || sx.req.pathName != req.pathName {
req.res <- webRTCDeleteSessionRes{err: ErrSessionNotFound}
continue
}