Merge pull request #14 from t123yh/master

Separate control and track with a `/`
This commit is contained in:
Andrey Semochkin 2021-02-15 00:37:09 +03:00 committed by GitHub
commit 340498eaae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -224,6 +224,9 @@ func (client *RTSPClient) ControlTrack(track string) string {
if strings.Contains(track, "rtsp://") { if strings.Contains(track, "rtsp://") {
return track return track
} }
if !strings.HasSuffix(client.control, "/") {
track = "/" + track
}
return client.control + track return client.control + track
} }