mirror of
https://github.com/aler9/gortsplib
synced 2025-10-07 08:01:14 +08:00
client: support server_port=0-1 (https://github.com/aler9/rtsp-simple-server/issues/407)
This commit is contained in:
@@ -487,6 +487,7 @@ func TestClientReadNoContentBase(t *testing.T) {
|
||||
func TestClientReadAnyPort(t *testing.T) {
|
||||
for _, ca := range []string{
|
||||
"zero",
|
||||
"zero_one",
|
||||
"no",
|
||||
} {
|
||||
t.Run(ca, func(t *testing.T) {
|
||||
@@ -556,8 +557,12 @@ func TestClientReadAnyPort(t *testing.T) {
|
||||
}(),
|
||||
ClientPorts: th.ClientPorts,
|
||||
ServerPorts: func() *[2]int {
|
||||
if ca == "zero" {
|
||||
switch ca {
|
||||
case "zero":
|
||||
return &[2]int{0, 0}
|
||||
|
||||
case "zero_one":
|
||||
return &[2]int{0, 1}
|
||||
}
|
||||
return nil
|
||||
}(),
|
||||
|
Reference in New Issue
Block a user