mirror of
https://github.com/aler9/gortsplib
synced 2025-10-04 14:52:46 +08:00
server: fix SETUP in case of no track ID and query parameters (#623)
This commit is contained in:
@@ -73,6 +73,9 @@ func getPathAndQueryAndTrackID(u *base.URL) (string, string, string, error) {
|
||||
|
||||
// no track ID and a trailing slash.
|
||||
// this happens when trying to read a MPEG-TS stream with FFmpeg.
|
||||
if strings.HasSuffix(u.RawQuery, "/") {
|
||||
return u.Path, u.RawQuery[:len(u.RawQuery)-1], "0", nil
|
||||
}
|
||||
if strings.HasSuffix(u.Path[1:], "/") {
|
||||
return u.Path[:len(u.Path)-1], u.RawQuery, "0", nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user