server: fix generation of RTP-Info

This commit is contained in:
aler9
2023-01-11 00:53:38 +01:00
parent 8664d5413d
commit ca3ab98cca
2 changed files with 3 additions and 1 deletions

View File

@@ -2180,6 +2180,7 @@ func TestServerPlayAdditionalInfos(t *testing.T) {
})
rtpInfo, ssrcs := getInfos()
require.True(t, strings.HasPrefix(mustParseURL((*rtpInfo)[0].URL).Path, "/teststream/mediaUUID="))
require.Equal(t, &headers.RTPInfo{
&headers.RTPInfoEntry{
URL: (&url.URL{
@@ -2214,6 +2215,7 @@ func TestServerPlayAdditionalInfos(t *testing.T) {
})
rtpInfo, ssrcs = getInfos()
require.True(t, strings.HasPrefix(mustParseURL((*rtpInfo)[0].URL).Path, "/teststream/mediaUUID="))
require.Equal(t, &headers.RTPInfo{
&headers.RTPInfoEntry{
URL: (&url.URL{

View File

@@ -897,7 +897,7 @@ func (ss *ServerSession) handleRequest(sc *ServerConn, req *base.Request) (*base
entry.URL = (&url.URL{
Scheme: req.URL.Scheme,
Host: req.URL.Host,
Path: "/" + *ss.setuppedPath + "/mediaUUID=" + ss.setuppedStream.streamMedias[sm.media].uuid.String(),
Path: *ss.setuppedPath + "/mediaUUID=" + ss.setuppedStream.streamMedias[sm.media].uuid.String(),
}).String()
ri = append(ri, entry)
}