mirror of
https://github.com/aler9/gortsplib
synced 2025-11-02 21:14:07 +08:00
headers: change Transport.Destination type to net.IP
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package headers
|
||||
|
||||
import (
|
||||
"net"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
@@ -55,8 +56,8 @@ var casesTransport = []struct {
|
||||
v := base.StreamDeliveryMulticast
|
||||
return &v
|
||||
}(),
|
||||
Destination: func() *string {
|
||||
v := "225.219.201.15"
|
||||
Destination: func() *net.IP {
|
||||
v := net.ParseIP("225.219.201.15")
|
||||
return &v
|
||||
}(),
|
||||
TTL: func() *uint {
|
||||
@@ -212,6 +213,11 @@ func TestTransportReadErrors(t *testing.T) {
|
||||
base.HeaderValue{`RTP/AVP;unicast;ttl=aa`},
|
||||
"strconv.ParseUint: parsing \"aa\": invalid syntax",
|
||||
},
|
||||
{
|
||||
"invalid destination",
|
||||
base.HeaderValue{`RTP/AVP;unicast;destination=aa`},
|
||||
"invalid destination (aa)",
|
||||
},
|
||||
{
|
||||
"invalid ports 1",
|
||||
base.HeaderValue{`RTP/AVP;unicast;port=aa`},
|
||||
|
||||
Reference in New Issue
Block a user