diff --git a/go.mod b/go.mod index 81fabf5d..2c7b6f2a 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.15 require ( github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d // indirect - github.com/aler9/gortsplib v0.0.0-20210328132003-213eb4908e9a + github.com/aler9/gortsplib v0.0.0-20210329200014-d39996c82445 github.com/davecgh/go-spew v1.1.1 // indirect github.com/fsnotify/fsnotify v1.4.9 github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 diff --git a/go.sum b/go.sum index d5885b49..e54b9699 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafo github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/aler9/gortsplib v0.0.0-20210328132003-213eb4908e9a h1:Sc6oUtwMUJrPOIaMIOq3TjZhjYIPtGnkAJiftjvpmvw= -github.com/aler9/gortsplib v0.0.0-20210328132003-213eb4908e9a/go.mod h1:zVCg+TQX445hh1pC5QgAuuBvvXZMWLY1XYz626dGFqY= +github.com/aler9/gortsplib v0.0.0-20210329200014-d39996c82445 h1:HulTLAWhDfvTBrRD/xxcD+8J3PImuykBCA2U62ZDUMU= +github.com/aler9/gortsplib v0.0.0-20210329200014-d39996c82445/go.mod h1:zVCg+TQX445hh1pC5QgAuuBvvXZMWLY1XYz626dGFqY= github.com/aler9/rtmp v0.0.0-20210309202041-2d7177b7300d h1:LAX8pNvYpGgFpKdbPpEZWjNkHbmyvjMrT3vO7s7aaKU= github.com/aler9/rtmp v0.0.0-20210309202041-2d7177b7300d/go.mod h1:vzuE21rowz+lT1NGsWbreIvYulgBpCGnQyeTyFblUHc= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= diff --git a/internal/clientrtsp/client.go b/internal/clientrtsp/client.go index b35b6d75..c9fbe984 100644 --- a/internal/clientrtsp/client.go +++ b/internal/clientrtsp/client.go @@ -350,7 +350,7 @@ func (c *Client) run() { lsn := ti.LastSequenceNumber ri = append(ri, &headers.RTPInfoEntry{ - URL: u, + URL: u.String(), SequenceNumber: &lsn, Timestamp: &ts, }) diff --git a/main_clientrtmp_test.go b/main_clientrtmp_test.go index 927c8e75..1b054bfb 100644 --- a/main_clientrtmp_test.go +++ b/main_clientrtmp_test.go @@ -236,20 +236,20 @@ func TestClientRTMPRTPInfo(t *testing.T) { require.Equal(t, &headers.RTPInfo{ &headers.RTPInfoEntry{ - URL: &base.URL{ + URL: (&base.URL{ Scheme: "rtsp", Host: ownDockerIP + ":8554", Path: "/teststream/trackID=0", - }, + }).String(), SequenceNumber: (*dest.RTPInfo())[0].SequenceNumber, Timestamp: (*dest.RTPInfo())[0].Timestamp, }, &headers.RTPInfoEntry{ - URL: &base.URL{ + URL: (&base.URL{ Scheme: "rtsp", Host: ownDockerIP + ":8554", Path: "/teststream/trackID=1", - }, + }).String(), SequenceNumber: (*dest.RTPInfo())[1].SequenceNumber, Timestamp: (*dest.RTPInfo())[1].Timestamp, }, diff --git a/main_clientrtsp_test.go b/main_clientrtsp_test.go index 53c4ecb4..cd64e7a5 100644 --- a/main_clientrtsp_test.go +++ b/main_clientrtsp_test.go @@ -665,11 +665,11 @@ func TestClientRTSPRTPInfo(t *testing.T) { require.Equal(t, &headers.RTPInfo{ &headers.RTPInfoEntry{ - URL: &base.URL{ + URL: (&base.URL{ Scheme: "rtsp", Host: ownDockerIP + ":8554", Path: "/teststream/trackID=0", - }, + }).String(), SequenceNumber: func() *uint16 { v := uint16(556) return &v @@ -703,11 +703,11 @@ func TestClientRTSPRTPInfo(t *testing.T) { require.Equal(t, &headers.RTPInfo{ &headers.RTPInfoEntry{ - URL: &base.URL{ + URL: (&base.URL{ Scheme: "rtsp", Host: ownDockerIP + ":8554", Path: "/teststream/trackID=0", - }, + }).String(), SequenceNumber: func() *uint16 { v := uint16(556) return &v @@ -715,11 +715,11 @@ func TestClientRTSPRTPInfo(t *testing.T) { Timestamp: (*dest.RTPInfo())[0].Timestamp, }, &headers.RTPInfoEntry{ - URL: &base.URL{ + URL: (&base.URL{ Scheme: "rtsp", Host: ownDockerIP + ":8554", Path: "/teststream/trackID=1", - }, + }).String(), SequenceNumber: func() *uint16 { v := uint16(87) return &v diff --git a/main_sourcertmp_test.go b/main_sourcertmp_test.go index 572c9b94..3cd576cf 100644 --- a/main_sourcertmp_test.go +++ b/main_sourcertmp_test.go @@ -92,11 +92,11 @@ func TestSourceRTMPRTPInfo(t *testing.T) { require.Equal(t, &headers.RTPInfo{ &headers.RTPInfoEntry{ - URL: &base.URL{ + URL: (&base.URL{ Scheme: "rtsp", Host: "127.0.1.2:8554", Path: "/proxied/trackID=0", - }, + }).String(), SequenceNumber: (*dest.RTPInfo())[0].SequenceNumber, Timestamp: (*dest.RTPInfo())[0].Timestamp, }, diff --git a/main_sourcertsp_test.go b/main_sourcertsp_test.go index ada3de5c..274cf93d 100644 --- a/main_sourcertsp_test.go +++ b/main_sourcertsp_test.go @@ -296,11 +296,11 @@ func TestSourceRTSPRTPInfo(t *testing.T) { require.Equal(t, &headers.RTPInfo{ &headers.RTPInfoEntry{ - URL: &base.URL{ + URL: (&base.URL{ Scheme: "rtsp", Host: "127.0.1.2:8554", Path: "/proxied/trackID=0", - }, + }).String(), SequenceNumber: func() *uint16 { v := uint16(87) return &v @@ -308,11 +308,11 @@ func TestSourceRTSPRTPInfo(t *testing.T) { Timestamp: (*dest.RTPInfo())[0].Timestamp, }, &headers.RTPInfoEntry{ - URL: &base.URL{ + URL: (&base.URL{ Scheme: "rtsp", Host: "127.0.1.2:8554", Path: "/proxied/trackID=1", - }, + }).String(), SequenceNumber: func() *uint16 { v := uint16(34254) return &v