From 6bcc7dcee0fed15bc73189f1f188b9be0da08bf1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 23:51:55 +0100 Subject: [PATCH 01/15] build(deps): bump github.com/MicahParks/keyfunc/v3 from 3.2.7 to 3.2.8 (#3132) --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 72f84a8351c..4e91cf47494 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( code.cloudfoundry.org/bytefmt v0.0.0 - github.com/MicahParks/keyfunc/v3 v3.2.7 + github.com/MicahParks/keyfunc/v3 v3.2.8 github.com/abema/go-mp4 v1.2.0 github.com/alecthomas/kong v0.8.1 github.com/bluenviron/gohlslib v1.3.0 @@ -34,7 +34,7 @@ require ( ) require ( - github.com/MicahParks/jwkset v0.5.13 // indirect + github.com/MicahParks/jwkset v0.5.14 // indirect github.com/asticode/go-astikit v0.30.0 // indirect github.com/asticode/go-astits v1.13.0 // indirect github.com/benburkert/openpgp v0.0.0-20160410205803-c2471f86866c // indirect diff --git a/go.sum b/go.sum index 8759bb5391e..efda7cb976c 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ -github.com/MicahParks/jwkset v0.5.13 h1:vRXsx+b8uaZm1AU6MpavHJXOmuwP36iR+DNmlg2Lx8o= -github.com/MicahParks/jwkset v0.5.13/go.mod h1:q8ptTGn/Z9c4MwbcfeCDssADeVQb3Pk7PnVxrvi+2QY= -github.com/MicahParks/keyfunc/v3 v3.2.7 h1:ZNVuh6dQ/1JQamtahDy1fUUPMVewZupWTDpMq/pxMqk= -github.com/MicahParks/keyfunc/v3 v3.2.7/go.mod h1:LXARqJdr+5ETgA2soFi8ZqX7hAES9YbSwxakZxLRWTk= +github.com/MicahParks/jwkset v0.5.14 h1:VeSaeoeERrYhbzaXyjDctbl5KqT+pHdaLZz8Or5GMNA= +github.com/MicahParks/jwkset v0.5.14/go.mod h1:q8ptTGn/Z9c4MwbcfeCDssADeVQb3Pk7PnVxrvi+2QY= +github.com/MicahParks/keyfunc/v3 v3.2.8 h1:3AFMW/fRykBs4VKbuEPAODvJXqnPjrqm/emOUJiX1+s= +github.com/MicahParks/keyfunc/v3 v3.2.8/go.mod h1:xO0NcrjdxfRJ+lDKNaXzhgFG/0XlnSi58JiMMAsQeZM= github.com/abema/go-mp4 v1.2.0 h1:gi4X8xg/m179N/J15Fn5ugywN9vtI6PLk6iLldHGLAk= github.com/abema/go-mp4 v1.2.0/go.mod h1:vPl9t5ZK7K0x68jh12/+ECWBCXoWuIDtNgPtU2f04ws= github.com/alecthomas/assert/v2 v2.1.0 h1:tbredtNcQnoSd3QBhQWI7QZ3XHOVkw1Moklp2ojoH/0= From 158786373c81c5a45919478894af200a401dbaa2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Mar 2024 22:24:11 +0100 Subject: [PATCH 02/15] build(deps): bump github.com/MicahParks/keyfunc/v3 from 3.2.8 to 3.2.9 (#3136) Bumps [github.com/MicahParks/keyfunc/v3](https://github.com/MicahParks/keyfunc) from 3.2.8 to 3.2.9. - [Release notes](https://github.com/MicahParks/keyfunc/releases) - [Commits](https://github.com/MicahParks/keyfunc/compare/v3.2.8...v3.2.9) --- updated-dependencies: - dependency-name: github.com/MicahParks/keyfunc/v3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 4e91cf47494..feaba7a1740 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( code.cloudfoundry.org/bytefmt v0.0.0 - github.com/MicahParks/keyfunc/v3 v3.2.8 + github.com/MicahParks/keyfunc/v3 v3.2.9 github.com/abema/go-mp4 v1.2.0 github.com/alecthomas/kong v0.8.1 github.com/bluenviron/gohlslib v1.3.0 @@ -34,7 +34,7 @@ require ( ) require ( - github.com/MicahParks/jwkset v0.5.14 // indirect + github.com/MicahParks/jwkset v0.5.15 // indirect github.com/asticode/go-astikit v0.30.0 // indirect github.com/asticode/go-astits v1.13.0 // indirect github.com/benburkert/openpgp v0.0.0-20160410205803-c2471f86866c // indirect diff --git a/go.sum b/go.sum index efda7cb976c..116b2350e7c 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ -github.com/MicahParks/jwkset v0.5.14 h1:VeSaeoeERrYhbzaXyjDctbl5KqT+pHdaLZz8Or5GMNA= -github.com/MicahParks/jwkset v0.5.14/go.mod h1:q8ptTGn/Z9c4MwbcfeCDssADeVQb3Pk7PnVxrvi+2QY= -github.com/MicahParks/keyfunc/v3 v3.2.8 h1:3AFMW/fRykBs4VKbuEPAODvJXqnPjrqm/emOUJiX1+s= -github.com/MicahParks/keyfunc/v3 v3.2.8/go.mod h1:xO0NcrjdxfRJ+lDKNaXzhgFG/0XlnSi58JiMMAsQeZM= +github.com/MicahParks/jwkset v0.5.15 h1:ACJY045Zuvo2TVWikeFLnKTIsEDQQHUHrNYiMW+gj24= +github.com/MicahParks/jwkset v0.5.15/go.mod h1:q8ptTGn/Z9c4MwbcfeCDssADeVQb3Pk7PnVxrvi+2QY= +github.com/MicahParks/keyfunc/v3 v3.2.9 h1:juKYzZvb5q4mWnox3439WNq6cusvSdt2fJ5nj+osgCk= +github.com/MicahParks/keyfunc/v3 v3.2.9/go.mod h1:Yx3jN/pn7ZMCxwFsyIrsmSqRfp0HGHAcyezBlhYi1Ew= github.com/abema/go-mp4 v1.2.0 h1:gi4X8xg/m179N/J15Fn5ugywN9vtI6PLk6iLldHGLAk= github.com/abema/go-mp4 v1.2.0/go.mod h1:vPl9t5ZK7K0x68jh12/+ECWBCXoWuIDtNgPtU2f04ws= github.com/alecthomas/assert/v2 v2.1.0 h1:tbredtNcQnoSd3QBhQWI7QZ3XHOVkw1Moklp2ojoH/0= From cc565865fe87152d4854bff693a1946a9c3f8105 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 08:31:53 +0100 Subject: [PATCH 03/15] build(deps): bump github.com/alecthomas/kong from 0.8.1 to 0.9.0 (#3133) --- go.mod | 2 +- go.sum | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index feaba7a1740..91294a1d21b 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( code.cloudfoundry.org/bytefmt v0.0.0 github.com/MicahParks/keyfunc/v3 v3.2.9 github.com/abema/go-mp4 v1.2.0 - github.com/alecthomas/kong v0.8.1 + github.com/alecthomas/kong v0.9.0 github.com/bluenviron/gohlslib v1.3.0 github.com/bluenviron/gortsplib/v4 v4.8.0 github.com/bluenviron/mediacommon v1.9.2 diff --git a/go.sum b/go.sum index 116b2350e7c..bd09895cff9 100644 --- a/go.sum +++ b/go.sum @@ -4,12 +4,12 @@ github.com/MicahParks/keyfunc/v3 v3.2.9 h1:juKYzZvb5q4mWnox3439WNq6cusvSdt2fJ5nj github.com/MicahParks/keyfunc/v3 v3.2.9/go.mod h1:Yx3jN/pn7ZMCxwFsyIrsmSqRfp0HGHAcyezBlhYi1Ew= github.com/abema/go-mp4 v1.2.0 h1:gi4X8xg/m179N/J15Fn5ugywN9vtI6PLk6iLldHGLAk= github.com/abema/go-mp4 v1.2.0/go.mod h1:vPl9t5ZK7K0x68jh12/+ECWBCXoWuIDtNgPtU2f04ws= -github.com/alecthomas/assert/v2 v2.1.0 h1:tbredtNcQnoSd3QBhQWI7QZ3XHOVkw1Moklp2ojoH/0= -github.com/alecthomas/assert/v2 v2.1.0/go.mod h1:b/+1DI2Q6NckYi+3mXyH3wFb8qG37K/DuK80n7WefXA= -github.com/alecthomas/kong v0.8.1 h1:acZdn3m4lLRobeh3Zi2S2EpnXTd1mOL6U7xVml+vfkY= -github.com/alecthomas/kong v0.8.1/go.mod h1:n1iCIO2xS46oE8ZfYCNDqdR0b0wZNrXAIAqro/2132U= -github.com/alecthomas/repr v0.1.0 h1:ENn2e1+J3k09gyj2shc0dHr/yjaWSHRlrJ4DPMevDqE= -github.com/alecthomas/repr v0.1.0/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= +github.com/alecthomas/assert/v2 v2.6.0 h1:o3WJwILtexrEUk3cUVal3oiQY2tfgr/FHWiz/v2n4FU= +github.com/alecthomas/assert/v2 v2.6.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= +github.com/alecthomas/kong v0.9.0 h1:G5diXxc85KvoV2f0ZRVuMsi45IrBgx9zDNGNj165aPA= +github.com/alecthomas/kong v0.9.0/go.mod h1:Y47y5gKfHp1hDc7CH7OeXgLIpp+Q2m1Ni0L5s3bI8Os= +github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc= +github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/aler9/ice/v2 v2.0.0-20231112223552-32d34dfcf3a1 h1:fD6eZt+3/t8bzFn6ZZA2eP63xBP06v3EPfPJu8DO8ys= github.com/aler9/ice/v2 v2.0.0-20231112223552-32d34dfcf3a1/go.mod h1:lT3kv5uUIlHfXHU/ZRD7uKD/ufM202+eTa3C/umgGf4= github.com/aler9/webrtc/v3 v3.0.0-20231112223655-e402ed2689c6 h1:wMd3D1mLghoYYh31STig8Kwm2qi8QyQKUy09qUUZrVw= From 29f0ded9f1067ab8a5d173985072e505b8c79c65 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Mar 2024 17:41:18 +0100 Subject: [PATCH 04/15] build(deps): bump google.golang.org/protobuf from 1.30.0 to 1.33.0 (#3139) Bumps google.golang.org/protobuf from 1.30.0 to 1.33.0. --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 91294a1d21b..7fae1599150 100644 --- a/go.mod +++ b/go.mod @@ -71,7 +71,7 @@ require ( golang.org/x/net v0.21.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - google.golang.org/protobuf v1.30.0 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index bd09895cff9..fb5d4facfa0 100644 --- a/go.sum +++ b/go.sum @@ -312,8 +312,8 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= From c7dbb951f331cd841007acf29679e8a460bff29d Mon Sep 17 00:00:00 2001 From: Alessandro Ros Date: Tue, 19 Mar 2024 12:53:26 +0100 Subject: [PATCH 05/15] update golangci-lint (#3149) --- .golangci.yml | 1 + Makefile | 2 +- internal/conf/env/env_test.go | 2 +- internal/core/path_test.go | 4 ++-- internal/formatprocessor/h264_test.go | 2 +- internal/formatprocessor/h265_test.go | 2 +- internal/protocols/rtmp/amf0/unmarshal_test.go | 2 +- internal/protocols/rtmp/chunk/chunk_test.go | 8 ++++---- internal/protocols/rtmp/message/reader_test.go | 2 +- internal/protocols/rtmp/rawmessage/reader_test.go | 8 ++++---- internal/protocols/websocket/serverconn.go | 2 +- internal/protocols/websocket/serverconn_test.go | 2 +- internal/record/agent_test.go | 4 ++-- internal/servers/rtmp/server_test.go | 2 +- internal/servers/rtsp/server_test.go | 2 +- internal/staticsources/hls/source.go | 4 ++-- internal/staticsources/rtsp/source_test.go | 12 ++++++------ 17 files changed, 31 insertions(+), 30 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index d2c93841a05..33a993a4226 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -15,6 +15,7 @@ linters: - nilerr - prealloc - revive + - usestdlibvars - unconvert - tparallel - wastedassign diff --git a/Makefile b/Makefile index e578be9b112..15e7cd26883 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ BASE_IMAGE = golang:1.21-alpine3.19 -LINT_IMAGE = golangci/golangci-lint:v1.55.2 +LINT_IMAGE = golangci/golangci-lint:v1.56.2 NODE_IMAGE = node:20-alpine3.19 ALPINE_IMAGE = alpine:3.19 RPI32_IMAGE = balenalib/raspberry-pi:bullseye-run-20230712 diff --git a/internal/conf/env/env_test.go b/internal/conf/env/env_test.go index 3de2759a7fc..47ff7e3978f 100644 --- a/internal/conf/env/env_test.go +++ b/internal/conf/env/env_test.go @@ -194,7 +194,7 @@ func FuzzLoad(f *testing.F) { f.Add("MYPREFIX_MYDURATION", "a") f.Add("MYPREFIX_MYDURATION_A", "a") - f.Fuzz(func(t *testing.T, key string, val string) { + f.Fuzz(func(_ *testing.T, key string, val string) { env := map[string]string{ key: val, } diff --git a/internal/core/path_test.go b/internal/core/path_test.go index edaa214d167..9c8613513a1 100644 --- a/internal/core/path_test.go +++ b/internal/core/path_test.go @@ -650,12 +650,12 @@ func TestPathSourceRegexp(t *testing.T) { StatusCode: base.StatusOK, }, stream, nil }, - onSetup: func(ctx *gortsplib.ServerHandlerOnSetupCtx) (*base.Response, *gortsplib.ServerStream, error) { + onSetup: func(_ *gortsplib.ServerHandlerOnSetupCtx) (*base.Response, *gortsplib.ServerStream, error) { return &base.Response{ StatusCode: base.StatusOK, }, stream, nil }, - onPlay: func(ctx *gortsplib.ServerHandlerOnPlayCtx) (*base.Response, error) { + onPlay: func(_ *gortsplib.ServerHandlerOnPlayCtx) (*base.Response, error) { return &base.Response{ StatusCode: base.StatusOK, }, nil diff --git a/internal/formatprocessor/h264_test.go b/internal/formatprocessor/h264_test.go index bf1fdeb1716..a5d18495c00 100644 --- a/internal/formatprocessor/h264_test.go +++ b/internal/formatprocessor/h264_test.go @@ -202,7 +202,7 @@ func TestH264EmptyPacket(t *testing.T) { } func FuzzRTPH264ExtractParams(f *testing.F) { - f.Fuzz(func(t *testing.T, b []byte) { + f.Fuzz(func(_ *testing.T, b []byte) { rtpH264ExtractParams(b) }) } diff --git a/internal/formatprocessor/h265_test.go b/internal/formatprocessor/h265_test.go index 7ad5d86c3df..dd478d24ebf 100644 --- a/internal/formatprocessor/h265_test.go +++ b/internal/formatprocessor/h265_test.go @@ -198,7 +198,7 @@ func TestH265EmptyPacket(t *testing.T) { } func FuzzRTPH265ExtractParams(f *testing.F) { - f.Fuzz(func(t *testing.T, b []byte) { + f.Fuzz(func(_ *testing.T, b []byte) { rtpH265ExtractParams(b) }) } diff --git a/internal/protocols/rtmp/amf0/unmarshal_test.go b/internal/protocols/rtmp/amf0/unmarshal_test.go index d8ff0a55271..b4564ec9835 100644 --- a/internal/protocols/rtmp/amf0/unmarshal_test.go +++ b/internal/protocols/rtmp/amf0/unmarshal_test.go @@ -307,7 +307,7 @@ func FuzzUnmarshal(f *testing.F) { f.Add(ca.enc) } - f.Fuzz(func(t *testing.T, b []byte) { + f.Fuzz(func(_ *testing.T, b []byte) { Unmarshal(b) //nolint:errcheck }) } diff --git a/internal/protocols/rtmp/chunk/chunk_test.go b/internal/protocols/rtmp/chunk/chunk_test.go index 9748aaae1d2..750ec753519 100644 --- a/internal/protocols/rtmp/chunk/chunk_test.go +++ b/internal/protocols/rtmp/chunk/chunk_test.go @@ -158,28 +158,28 @@ func TestChunkMarshal(t *testing.T) { } func FuzzChunk0Read(f *testing.F) { - f.Fuzz(func(t *testing.T, b []byte) { + f.Fuzz(func(_ *testing.T, b []byte) { var chunk Chunk0 chunk.Read(bytes.NewReader(b), 65536, false) //nolint:errcheck }) } func FuzzChunk1Read(f *testing.F) { - f.Fuzz(func(t *testing.T, b []byte) { + f.Fuzz(func(_ *testing.T, b []byte) { var chunk Chunk1 chunk.Read(bytes.NewReader(b), 65536, false) //nolint:errcheck }) } func FuzzChunk2Read(f *testing.F) { - f.Fuzz(func(t *testing.T, b []byte) { + f.Fuzz(func(_ *testing.T, b []byte) { var chunk Chunk2 chunk.Read(bytes.NewReader(b), 65536, false) //nolint:errcheck }) } func FuzzChunk3Read(f *testing.F) { - f.Fuzz(func(t *testing.T, b []byte) { + f.Fuzz(func(_ *testing.T, b []byte) { var chunk Chunk3 chunk.Read(bytes.NewReader(b), 65536, true) //nolint:errcheck }) diff --git a/internal/protocols/rtmp/message/reader_test.go b/internal/protocols/rtmp/message/reader_test.go index ff8d3386cb4..5ce3af1db08 100644 --- a/internal/protocols/rtmp/message/reader_test.go +++ b/internal/protocols/rtmp/message/reader_test.go @@ -297,7 +297,7 @@ func FuzzReader(f *testing.F) { 0x01, 0x00, 0x00, 0x00, 0x88, 0x68, 0x76, 0x63, 0x31, 0x01, 0x02, 0x03, }) - f.Fuzz(func(t *testing.T, b []byte) { + f.Fuzz(func(_ *testing.T, b []byte) { bc := bytecounter.NewReader(bytes.NewReader(b)) r := NewReader(bc, bc, nil) r.Read() //nolint:errcheck diff --git a/internal/protocols/rtmp/rawmessage/reader_test.go b/internal/protocols/rtmp/rawmessage/reader_test.go index 6b65b28e46a..ee59c393be6 100644 --- a/internal/protocols/rtmp/rawmessage/reader_test.go +++ b/internal/protocols/rtmp/rawmessage/reader_test.go @@ -205,7 +205,7 @@ func TestReader(t *testing.T) { t.Run(ca.name, func(t *testing.T) { var buf bytes.Buffer br := bytecounter.NewReader(&buf) - r := NewReader(br, br, func(count uint32) error { + r := NewReader(br, br, func(_ uint32) error { return nil }) @@ -234,7 +234,7 @@ func TestReaderAcknowledge(t *testing.T) { var buf bytes.Buffer bc := bytecounter.NewReader(&buf) - r := NewReader(bc, bc, func(count uint32) error { + r := NewReader(bc, bc, func(_ uint32) error { close(onAckCalled) return nil }) @@ -269,9 +269,9 @@ func TestReaderAcknowledge(t *testing.T) { } func FuzzReader(f *testing.F) { - f.Fuzz(func(t *testing.T, b []byte) { + f.Fuzz(func(_ *testing.T, b []byte) { br := bytecounter.NewReader(bytes.NewReader(b)) - r := NewReader(br, br, func(count uint32) error { + r := NewReader(br, br, func(_ uint32) error { return nil }) diff --git a/internal/protocols/websocket/serverconn.go b/internal/protocols/websocket/serverconn.go index f0e81922bf6..c5fd3506d08 100644 --- a/internal/protocols/websocket/serverconn.go +++ b/internal/protocols/websocket/serverconn.go @@ -18,7 +18,7 @@ var ( ) var upgrader = websocket.Upgrader{ - CheckOrigin: func(r *http.Request) bool { + CheckOrigin: func(_ *http.Request) bool { return true }, } diff --git a/internal/protocols/websocket/serverconn_test.go b/internal/protocols/websocket/serverconn_test.go index 8b40efb7b41..e6d5ce9dd4a 100644 --- a/internal/protocols/websocket/serverconn_test.go +++ b/internal/protocols/websocket/serverconn_test.go @@ -39,7 +39,7 @@ func TestServerConn(t *testing.T) { defer res.Body.Close() defer c.Close() //nolint:errcheck - c.SetPingHandler(func(msg string) error { + c.SetPingHandler(func(_ string) error { close(pingReceived) return nil }) diff --git a/internal/record/agent_test.go b/internal/record/agent_test.go index 4e4dd3dc69d..9c394b6d3f1 100644 --- a/internal/record/agent_test.go +++ b/internal/record/agent_test.go @@ -167,10 +167,10 @@ func TestAgent(t *testing.T) { SegmentDuration: 1 * time.Second, PathName: "mypath", Stream: stream, - OnSegmentCreate: func(fpath string) { + OnSegmentCreate: func(_ string) { segCreated <- struct{}{} }, - OnSegmentComplete: func(fpath string) { + OnSegmentComplete: func(_ string) { segDone <- struct{}{} }, Parent: &test.NilLogger{}, diff --git a/internal/servers/rtmp/server_test.go b/internal/servers/rtmp/server_test.go index 24a1b8ef5eb..6bf292ebcbb 100644 --- a/internal/servers/rtmp/server_test.go +++ b/internal/servers/rtmp/server_test.go @@ -258,7 +258,7 @@ func TestServerRead(t *testing.T) { }, }) - r.OnDataH264(func(pts time.Duration, au [][]byte) { + r.OnDataH264(func(_ time.Duration, au [][]byte) { require.Equal(t, [][]byte{ test.FormatH264.SPS, test.FormatH264.PPS, diff --git a/internal/servers/rtsp/server_test.go b/internal/servers/rtsp/server_test.go index 943910b6c70..c732d214d73 100644 --- a/internal/servers/rtsp/server_test.go +++ b/internal/servers/rtsp/server_test.go @@ -228,7 +228,7 @@ func TestServerRead(t *testing.T) { recv := make(chan struct{}) - reader.OnPacketRTPAny(func(m *description.Media, f format.Format, p *rtp.Packet) { + reader.OnPacketRTPAny(func(_ *description.Media, _ format.Format, p *rtp.Packet) { require.Equal(t, &rtp.Packet{ Header: rtp.Header{ Version: 2, diff --git a/internal/staticsources/hls/source.go b/internal/staticsources/hls/source.go index 7e9d2b879fc..bbffce65187 100644 --- a/internal/staticsources/hls/source.go +++ b/internal/staticsources/hls/source.go @@ -123,7 +123,7 @@ func (s *Source) Run(params defs.StaticSourceRunParams) error { }}, } - c.OnDataH26x(track, func(pts time.Duration, dts time.Duration, au [][]byte) { + c.OnDataH26x(track, func(pts time.Duration, _ time.Duration, au [][]byte) { stream.WriteUnit(medi, medi.Formats[0], &unit.H264{ Base: unit.Base{ NTP: time.Now(), @@ -144,7 +144,7 @@ func (s *Source) Run(params defs.StaticSourceRunParams) error { }}, } - c.OnDataH26x(track, func(pts time.Duration, dts time.Duration, au [][]byte) { + c.OnDataH26x(track, func(pts time.Duration, _ time.Duration, au [][]byte) { stream.WriteUnit(medi, medi.Formats[0], &unit.H265{ Base: unit.Base{ NTP: time.Now(), diff --git a/internal/staticsources/rtsp/source_test.go b/internal/staticsources/rtsp/source_test.go index ebdb3e99d32..6741d0fd0e9 100644 --- a/internal/staticsources/rtsp/source_test.go +++ b/internal/staticsources/rtsp/source_test.go @@ -69,12 +69,12 @@ func TestSource(t *testing.T) { StatusCode: base.StatusOK, }, stream, nil }, - onSetup: func(ctx *gortsplib.ServerHandlerOnSetupCtx) (*base.Response, *gortsplib.ServerStream, error) { + onSetup: func(_ *gortsplib.ServerHandlerOnSetupCtx) (*base.Response, *gortsplib.ServerStream, error) { return &base.Response{ StatusCode: base.StatusOK, }, stream, nil }, - onPlay: func(ctx *gortsplib.ServerHandlerOnPlayCtx) (*base.Response, error) { + onPlay: func(_ *gortsplib.ServerHandlerOnPlayCtx) (*base.Response, error) { go func() { time.Sleep(100 * time.Millisecond) err := stream.WritePacketRTP(media0, &rtp.Packet{ @@ -195,7 +195,7 @@ func TestRTSPSourceNoPassword(t *testing.T) { StatusCode: base.StatusOK, }, stream, nil }, - onSetup: func(ctx *gortsplib.ServerHandlerOnSetupCtx) (*base.Response, *gortsplib.ServerStream, error) { + onSetup: func(_ *gortsplib.ServerHandlerOnSetupCtx) (*base.Response, *gortsplib.ServerStream, error) { go func() { time.Sleep(100 * time.Millisecond) err := stream.WritePacketRTP(media0, &rtp.Packet{ @@ -216,7 +216,7 @@ func TestRTSPSourceNoPassword(t *testing.T) { StatusCode: base.StatusOK, }, stream, nil }, - onPlay: func(ctx *gortsplib.ServerHandlerOnPlayCtx) (*base.Response, error) { + onPlay: func(_ *gortsplib.ServerHandlerOnPlayCtx) (*base.Response, error) { return &base.Response{ StatusCode: base.StatusOK, }, nil @@ -263,12 +263,12 @@ func TestRTSPSourceRange(t *testing.T) { s := gortsplib.Server{ Handler: &testServer{ - onDescribe: func(ctx *gortsplib.ServerHandlerOnDescribeCtx) (*base.Response, *gortsplib.ServerStream, error) { + onDescribe: func(_ *gortsplib.ServerHandlerOnDescribeCtx) (*base.Response, *gortsplib.ServerStream, error) { return &base.Response{ StatusCode: base.StatusOK, }, stream, nil }, - onSetup: func(ctx *gortsplib.ServerHandlerOnSetupCtx) (*base.Response, *gortsplib.ServerStream, error) { + onSetup: func(_ *gortsplib.ServerHandlerOnSetupCtx) (*base.Response, *gortsplib.ServerStream, error) { return &base.Response{ StatusCode: base.StatusOK, }, stream, nil From 1d4ea2cd9a6c88b3444d71ac9bbf596079889149 Mon Sep 17 00:00:00 2001 From: Alessandro Ros Date: Tue, 19 Mar 2024 14:01:14 +0100 Subject: [PATCH 06/15] hls: fix freeze in case of muxing errors (#3135) (#3150) --- internal/asyncwriter/async_writer.go | 1 + internal/asyncwriter/async_writer_test.go | 22 ++++++++++++++++++++++ internal/servers/hls/muxer.go | 15 +++++++-------- internal/servers/rtmp/conn.go | 2 +- internal/servers/srt/conn.go | 2 +- internal/servers/webrtc/session.go | 3 +-- internal/test/source_tester.go | 1 + 7 files changed, 34 insertions(+), 12 deletions(-) create mode 100644 internal/asyncwriter/async_writer_test.go diff --git a/internal/asyncwriter/async_writer.go b/internal/asyncwriter/async_writer.go index 36761e3658f..2c80f0d3032 100644 --- a/internal/asyncwriter/async_writer.go +++ b/internal/asyncwriter/async_writer.go @@ -50,6 +50,7 @@ func (w *Writer) Error() chan error { func (w *Writer) run() { w.err <- w.runInner() + close(w.err) } func (w *Writer) runInner() error { diff --git a/internal/asyncwriter/async_writer_test.go b/internal/asyncwriter/async_writer_test.go new file mode 100644 index 00000000000..139dd44a593 --- /dev/null +++ b/internal/asyncwriter/async_writer_test.go @@ -0,0 +1,22 @@ +package asyncwriter + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/require" +) + +func TestAsyncWriter(t *testing.T) { + w := New(512, nil) + + w.Start() + defer w.Stop() + + w.Push(func() error { + return fmt.Errorf("testerror") + }) + + err := <-w.Error() + require.EqualError(t, err, "testerror") +} diff --git a/internal/servers/hls/muxer.go b/internal/servers/hls/muxer.go index 6a319a5fb4e..ac103641194 100644 --- a/internal/servers/hls/muxer.go +++ b/internal/servers/hls/muxer.go @@ -165,6 +165,12 @@ func (m *muxer) runInner() error { recreateTimer = emptyTimer() } + defer func() { + if mi != nil { + mi.close() + } + }() + var activityCheckTimer *time.Timer if m.remoteAddr != "" { activityCheckTimer = time.NewTimer(closeCheckPeriod) @@ -178,13 +184,12 @@ func (m *muxer) runInner() error { req.res <- mi case err := <-instanceError: - mi.close() - if m.remoteAddr != "" { return err } m.Log(logger.Error, err.Error()) + mi.close() mi = nil instanceError = make(chan error) recreateTimer = time.NewTimer(recreatePause) @@ -215,17 +220,11 @@ func (m *muxer) runInner() error { case <-activityCheckTimer.C: t := time.Unix(0, atomic.LoadInt64(m.lastRequestTime)) if time.Since(t) >= closeAfterInactivity { - if mi != nil { - mi.close() - } return fmt.Errorf("not used anymore") } activityCheckTimer = time.NewTimer(closeCheckPeriod) case <-m.ctx.Done(): - if mi != nil { - mi.close() - } return errors.New("terminated") } } diff --git a/internal/servers/rtmp/conn.go b/internal/servers/rtmp/conn.go index 2b7b8c02c94..4d78b737e52 100644 --- a/internal/servers/rtmp/conn.go +++ b/internal/servers/rtmp/conn.go @@ -237,10 +237,10 @@ func (c *conn) runRead(conn *rtmp.Conn, u *url.URL) error { c.nconn.SetReadDeadline(time.Time{}) writer.Start() + defer writer.Stop() select { case <-c.ctx.Done(): - writer.Stop() return fmt.Errorf("terminated") case err := <-writer.Error(): diff --git a/internal/servers/srt/conn.go b/internal/servers/srt/conn.go index b227fe4fcd9..971fb5afcdc 100644 --- a/internal/servers/srt/conn.go +++ b/internal/servers/srt/conn.go @@ -327,10 +327,10 @@ func (c *conn) runRead(req srtNewConnReq, streamID *streamID) (bool, error) { sconn.SetReadDeadline(time.Time{}) writer.Start() + defer writer.Stop() select { case <-c.ctx.Done(): - writer.Stop() return true, fmt.Errorf("terminated") case err := <-writer.Error(): diff --git a/internal/servers/webrtc/session.go b/internal/servers/webrtc/session.go index 67e3a2a8583..96d0f15ea50 100644 --- a/internal/servers/webrtc/session.go +++ b/internal/servers/webrtc/session.go @@ -612,17 +612,16 @@ func (s *session) runRead() (int, error) { defer onUnreadHook() writer.Start() + defer writer.Stop() select { case <-pc.Disconnected(): - writer.Stop() return 0, fmt.Errorf("peer connection closed") case err := <-writer.Error(): return 0, err case <-s.ctx.Done(): - writer.Stop() return 0, fmt.Errorf("terminated") } } diff --git a/internal/test/source_tester.go b/internal/test/source_tester.go index 475e653332d..7a52501aa15 100644 --- a/internal/test/source_tester.go +++ b/internal/test/source_tester.go @@ -69,6 +69,7 @@ func (t *SourceTester) SetReady(req defs.PathSourceStaticSetReadyReq) defs.PathS ) t.writer = asyncwriter.New(2048, t) + t.stream.AddReader(t.writer, req.Desc.Medias[0], req.Desc.Medias[0].Formats[0], func(u unit.Unit) error { t.Unit <- u close(t.Unit) From 4e581af7a6d45dbb47ec5de612b9e8e88d9f89c2 Mon Sep 17 00:00:00 2001 From: Alessandro Ros Date: Tue, 19 Mar 2024 14:09:25 +0100 Subject: [PATCH 07/15] hls: fix directory creation when using hlsDirectory (#3135) (#3151) --- internal/servers/hls/muxer_instance.go | 4 ++- internal/servers/hls/server_test.go | 50 ++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/internal/servers/hls/muxer_instance.go b/internal/servers/hls/muxer_instance.go index 8b1a408d6b4..1c512e5f003 100644 --- a/internal/servers/hls/muxer_instance.go +++ b/internal/servers/hls/muxer_instance.go @@ -54,7 +54,6 @@ func (mi *muxerInstance) initialize() error { if mi.directory != "" { muxerDirectory = filepath.Join(mi.directory, mi.pathName) os.MkdirAll(muxerDirectory, 0o755) - defer os.Remove(muxerDirectory) } mi.hmuxer = &gohlslib.Muxer{ @@ -91,6 +90,9 @@ func (mi *muxerInstance) close() { mi.writer.Stop() mi.hmuxer.Close() mi.stream.RemoveReader(mi.writer) + if mi.hmuxer.Directory != "" { + os.Remove(mi.hmuxer.Directory) + } } func (mi *muxerInstance) createVideoTrack() *gohlslib.Track { diff --git a/internal/servers/hls/server_test.go b/internal/servers/hls/server_test.go index 31dc0dd41df..e0c4548b16b 100644 --- a/internal/servers/hls/server_test.go +++ b/internal/servers/hls/server_test.go @@ -3,6 +3,8 @@ package hls import ( "fmt" "net/http" + "os" + "path/filepath" "testing" "time" @@ -293,3 +295,51 @@ func TestServerRead(t *testing.T) { <-recv }) } + +func TestDirectory(t *testing.T) { + dir, err := os.MkdirTemp("", "mediamtx-playback") + require.NoError(t, err) + defer os.RemoveAll(dir) + + desc := &description.Session{Medias: []*description.Media{test.MediaH264}} + + stream, err := stream.New( + 1460, + desc, + true, + test.NilLogger{}, + ) + require.NoError(t, err) + + pathManager := &dummyPathManager{stream: stream} + + s := &Server{ + Address: "127.0.0.1:8888", + Encryption: false, + ServerKey: "", + ServerCert: "", + AlwaysRemux: true, + Variant: conf.HLSVariant(gohlslib.MuxerVariantMPEGTS), + SegmentCount: 7, + SegmentDuration: conf.StringDuration(1 * time.Second), + PartDuration: conf.StringDuration(200 * time.Millisecond), + SegmentMaxSize: 50 * 1024 * 1024, + AllowOrigin: "", + TrustedProxies: conf.IPNetworks{}, + Directory: filepath.Join(dir, "mydir"), + ReadTimeout: conf.StringDuration(10 * time.Second), + WriteQueueSize: 512, + PathManager: pathManager, + Parent: &test.NilLogger{}, + } + err = s.Initialize() + require.NoError(t, err) + defer s.Close() + + s.PathReady(&dummyPath{}) + + time.Sleep(100 * time.Millisecond) + + _, err = os.Stat(filepath.Join(dir, "mydir", "mystream")) + require.NoError(t, err) +} From a11403fb6bb6baacc471f8ea8df0de406f821750 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Mar 2024 19:26:00 +0100 Subject: [PATCH 08/15] build(deps): bump github.com/pion/rtp from 1.8.3 to 1.8.4 (#3153) Bumps [github.com/pion/rtp](https://github.com/pion/rtp) from 1.8.3 to 1.8.4. - [Release notes](https://github.com/pion/rtp/releases) - [Changelog](https://github.com/pion/rtp/blob/master/.goreleaser.yml) - [Commits](https://github.com/pion/rtp/compare/v1.8.3...v1.8.4) --- updated-dependencies: - dependency-name: github.com/pion/rtp dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 7fae1599150..85dc7735abf 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/pion/interceptor v0.1.25 github.com/pion/logging v0.2.2 github.com/pion/rtcp v1.2.14 - github.com/pion/rtp v1.8.3 + github.com/pion/rtp v1.8.4 github.com/pion/sdp/v3 v3.0.8 github.com/pion/webrtc/v3 v3.2.22 github.com/stretchr/testify v1.9.0 diff --git a/go.sum b/go.sum index fb5d4facfa0..dad94936c1a 100644 --- a/go.sum +++ b/go.sum @@ -148,8 +148,9 @@ github.com/pion/rtcp v1.2.12/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9 github.com/pion/rtcp v1.2.14 h1:KCkGV3vJ+4DAJmvP0vaQShsb0xkRfWkO540Gy102KyE= github.com/pion/rtcp v1.2.14/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9L4= github.com/pion/rtp v1.8.2/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= -github.com/pion/rtp v1.8.3 h1:VEHxqzSVQxCkKDSHro5/4IUUG1ea+MFdqR2R3xSpNU8= github.com/pion/rtp v1.8.3/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= +github.com/pion/rtp v1.8.4 h1:VqNGMNjMDMy9y0d+h+0dfjiWVKUEDQvA963jhJwu200= +github.com/pion/rtp v1.8.4/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= github.com/pion/sctp v1.8.5/go.mod h1:SUFFfDpViyKejTAdwD1d/HQsCu+V/40cCs2nZIvC3s0= github.com/pion/sctp v1.8.8 h1:5EdnnKI4gpyR1a1TwbiS/wxEgcUWBHsc7ILAjARJB+U= github.com/pion/sctp v1.8.8/go.mod h1:igF9nZBrjh5AtmKc7U30jXltsFHicFCXSmWA2GWRaWs= From ac14a2ff7c403029ea5b9d2940143b11fc194fc8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Mar 2024 19:27:03 +0100 Subject: [PATCH 09/15] build(deps): bump github.com/datarhei/gosrt from 0.5.7 to 0.6.0 (#3154) Bumps [github.com/datarhei/gosrt](https://github.com/datarhei/gosrt) from 0.5.7 to 0.6.0. - [Commits](https://github.com/datarhei/gosrt/compare/v0.5.7...v0.6.0) --- updated-dependencies: - dependency-name: github.com/datarhei/gosrt dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 85dc7735abf..4848ff4dc6c 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/bluenviron/gohlslib v1.3.0 github.com/bluenviron/gortsplib/v4 v4.8.0 github.com/bluenviron/mediacommon v1.9.2 - github.com/datarhei/gosrt v0.5.7 + github.com/datarhei/gosrt v0.6.0 github.com/fsnotify/fsnotify v1.7.0 github.com/gin-gonic/gin v1.9.1 github.com/golang-jwt/jwt/v5 v5.2.1 diff --git a/go.sum b/go.sum index dad94936c1a..04f6f7a8702 100644 --- a/go.sum +++ b/go.sum @@ -35,8 +35,8 @@ github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583j github.com/cloudfoundry/bytefmt v0.0.0-20211005130812-5bb3c17173e5 h1:xB7KkA98BcUdzVcwyZxb5R0FGIHxNPHgZOzkjPEY5gM= github.com/cloudfoundry/bytefmt v0.0.0-20211005130812-5bb3c17173e5/go.mod h1:v4VVB6oBMz/c9fRY6vZrwr5xKRWOH5NPDjQZlPk0Gbs= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/datarhei/gosrt v0.5.7 h1:1COeDgF0D0v0poWu0yKDC72d29x16Ma6VFR1icx+3Xc= -github.com/datarhei/gosrt v0.5.7/go.mod h1:ZicbsY9T2rXtWgQVBTR9ilnEkSYVSIb36hG9Lj7XCKM= +github.com/datarhei/gosrt v0.6.0 h1:HrrXAw90V78ok4WMIhX6se1aTHPCn82Sg2hj+PhdmGc= +github.com/datarhei/gosrt v0.6.0/go.mod h1:fsOWdLSHUHShHjgi/46h6wjtdQrtnSdAQFnlas8ONxs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= From a540454332d059b618eaf8e1b10aa94f4aa40144 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Mar 2024 11:59:59 +0100 Subject: [PATCH 10/15] build(deps): bump github.com/pion/interceptor from 0.1.25 to 0.1.27 (#3171) Bumps [github.com/pion/interceptor](https://github.com/pion/interceptor) from 0.1.25 to 0.1.27. - [Release notes](https://github.com/pion/interceptor/releases) - [Changelog](https://github.com/pion/interceptor/blob/master/.goreleaser.yml) - [Commits](https://github.com/pion/interceptor/compare/v0.1.25...v0.1.27) --- updated-dependencies: - dependency-name: github.com/pion/interceptor dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 4848ff4dc6c..35ded2b4436 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 github.com/matthewhartstonge/argon2 v1.0.0 github.com/pion/ice/v2 v2.3.11 - github.com/pion/interceptor v0.1.25 + github.com/pion/interceptor v0.1.27 github.com/pion/logging v0.2.2 github.com/pion/rtcp v1.2.14 github.com/pion/rtp v1.8.4 diff --git a/go.sum b/go.sum index 04f6f7a8702..73429bd692e 100644 --- a/go.sum +++ b/go.sum @@ -134,8 +134,9 @@ github.com/pion/datachannel v1.5.5 h1:10ef4kwdjije+M9d7Xm9im2Y3O6A6ccQb0zcqZcJew github.com/pion/datachannel v1.5.5/go.mod h1:iMz+lECmfdCMqFRhXhcA/219B0SQlbpoR2V118yimL0= github.com/pion/dtls/v2 v2.2.7 h1:cSUBsETxepsCSFSxC3mc/aDo14qQLMSL+O6IjG28yV8= github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s= -github.com/pion/interceptor v0.1.25 h1:pwY9r7P6ToQ3+IF0bajN0xmk/fNw/suTgaTdlwTDmhc= github.com/pion/interceptor v0.1.25/go.mod h1:wkbPYAak5zKsfpVDYMtEfWEy8D4zL+rpxCxPImLOg3Y= +github.com/pion/interceptor v0.1.27 h1:mZ01OiGiukwRxezmDGzYjjokCVlDOk4T6BfaL5qrtGo= +github.com/pion/interceptor v0.1.27/go.mod h1:/vVaqLwDjGv4GRbgmChIKZIT5EXFDijwmj4WmIYy9bI= github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY= github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms= github.com/pion/mdns v0.0.7/go.mod h1:4iP2UbeFhLI/vWju/bw6ZfwjJzk0z8DNValjGxR/dD8= From 4666e5f42759b5680bd2ad3f287d6800b7d6f118 Mon Sep 17 00:00:00 2001 From: Mauricio Antunes Date: Mon, 1 Apr 2024 07:18:02 -0300 Subject: [PATCH 11/15] Fix API version in docs (#3180) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e80d490305..e313ac4e544 100644 --- a/README.md +++ b/README.md @@ -1676,7 +1676,7 @@ api: yes The API listens on `apiAddress`, that by default is `127.0.0.1:9997`; for instance, to obtain a list of active paths, run: ``` -curl http://127.0.0.1:9997/v2/paths/list +curl http://127.0.0.1:9997/v3/paths/list ``` Full documentation of the Control API is available on the [dedicated site](https://bluenviron.github.io/mediamtx/). From 0b9b02321c80c9441a1a136b55757f6ccd41d431 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 12:18:50 +0200 Subject: [PATCH 12/15] build(deps): bump github.com/pion/rtp from 1.8.4 to 1.8.5 (#3178) Bumps [github.com/pion/rtp](https://github.com/pion/rtp) from 1.8.4 to 1.8.5. - [Release notes](https://github.com/pion/rtp/releases) - [Changelog](https://github.com/pion/rtp/blob/master/.goreleaser.yml) - [Commits](https://github.com/pion/rtp/compare/v1.8.4...v1.8.5) --- updated-dependencies: - dependency-name: github.com/pion/rtp dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 35ded2b4436..dca2907a56b 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/pion/interceptor v0.1.27 github.com/pion/logging v0.2.2 github.com/pion/rtcp v1.2.14 - github.com/pion/rtp v1.8.4 + github.com/pion/rtp v1.8.5 github.com/pion/sdp/v3 v3.0.8 github.com/pion/webrtc/v3 v3.2.22 github.com/stretchr/testify v1.9.0 diff --git a/go.sum b/go.sum index 73429bd692e..f71235edd69 100644 --- a/go.sum +++ b/go.sum @@ -150,8 +150,9 @@ github.com/pion/rtcp v1.2.14 h1:KCkGV3vJ+4DAJmvP0vaQShsb0xkRfWkO540Gy102KyE= github.com/pion/rtcp v1.2.14/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9L4= github.com/pion/rtp v1.8.2/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= github.com/pion/rtp v1.8.3/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= -github.com/pion/rtp v1.8.4 h1:VqNGMNjMDMy9y0d+h+0dfjiWVKUEDQvA963jhJwu200= github.com/pion/rtp v1.8.4/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= +github.com/pion/rtp v1.8.5 h1:uYzINfaK+9yWs7r537z/Rc1SvT8ILjBcmDOpJcTB+OU= +github.com/pion/rtp v1.8.5/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= github.com/pion/sctp v1.8.5/go.mod h1:SUFFfDpViyKejTAdwD1d/HQsCu+V/40cCs2nZIvC3s0= github.com/pion/sctp v1.8.8 h1:5EdnnKI4gpyR1a1TwbiS/wxEgcUWBHsc7ILAjARJB+U= github.com/pion/sctp v1.8.8/go.mod h1:igF9nZBrjh5AtmKc7U30jXltsFHicFCXSmWA2GWRaWs= From d578fef78f76eae32f02890badc919e24cfe9396 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 12:20:55 +0200 Subject: [PATCH 13/15] build(deps): bump github.com/MicahParks/keyfunc/v3 from 3.2.9 to 3.3.2 (#3168) Bumps [github.com/MicahParks/keyfunc/v3](https://github.com/MicahParks/keyfunc) from 3.2.9 to 3.3.2. - [Release notes](https://github.com/MicahParks/keyfunc/releases) - [Commits](https://github.com/MicahParks/keyfunc/compare/v3.2.9...v3.3.2) --- updated-dependencies: - dependency-name: github.com/MicahParks/keyfunc/v3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index dca2907a56b..ab649898b95 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( code.cloudfoundry.org/bytefmt v0.0.0 - github.com/MicahParks/keyfunc/v3 v3.2.9 + github.com/MicahParks/keyfunc/v3 v3.3.2 github.com/abema/go-mp4 v1.2.0 github.com/alecthomas/kong v0.9.0 github.com/bluenviron/gohlslib v1.3.0 @@ -34,7 +34,7 @@ require ( ) require ( - github.com/MicahParks/jwkset v0.5.15 // indirect + github.com/MicahParks/jwkset v0.5.17 // indirect github.com/asticode/go-astikit v0.30.0 // indirect github.com/asticode/go-astits v1.13.0 // indirect github.com/benburkert/openpgp v0.0.0-20160410205803-c2471f86866c // indirect diff --git a/go.sum b/go.sum index f71235edd69..9987aff719f 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ -github.com/MicahParks/jwkset v0.5.15 h1:ACJY045Zuvo2TVWikeFLnKTIsEDQQHUHrNYiMW+gj24= -github.com/MicahParks/jwkset v0.5.15/go.mod h1:q8ptTGn/Z9c4MwbcfeCDssADeVQb3Pk7PnVxrvi+2QY= -github.com/MicahParks/keyfunc/v3 v3.2.9 h1:juKYzZvb5q4mWnox3439WNq6cusvSdt2fJ5nj+osgCk= -github.com/MicahParks/keyfunc/v3 v3.2.9/go.mod h1:Yx3jN/pn7ZMCxwFsyIrsmSqRfp0HGHAcyezBlhYi1Ew= +github.com/MicahParks/jwkset v0.5.17 h1:DrcwyKwSP5adD0G2XJTvDulnWXjD6gbjROMgMXDbkKA= +github.com/MicahParks/jwkset v0.5.17/go.mod h1:q8ptTGn/Z9c4MwbcfeCDssADeVQb3Pk7PnVxrvi+2QY= +github.com/MicahParks/keyfunc/v3 v3.3.2 h1:YTtwc4dxalBZKFqHhqctBWN6VhbLdGhywmne9u5RQVM= +github.com/MicahParks/keyfunc/v3 v3.3.2/go.mod h1:GJBeEjnv25OnD9y2OYQa7ELU6gYahEMBNXINZb+qm34= github.com/abema/go-mp4 v1.2.0 h1:gi4X8xg/m179N/J15Fn5ugywN9vtI6PLk6iLldHGLAk= github.com/abema/go-mp4 v1.2.0/go.mod h1:vPl9t5ZK7K0x68jh12/+ECWBCXoWuIDtNgPtU2f04ws= github.com/alecthomas/assert/v2 v2.6.0 h1:o3WJwILtexrEUk3cUVal3oiQY2tfgr/FHWiz/v2n4FU= From f5d9fde60499c1a3ba51f91166f88753d9146256 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 12:22:35 +0200 Subject: [PATCH 14/15] build(deps): bump github.com/pion/sdp/v3 from 3.0.8 to 3.0.9 (#3179) Bumps [github.com/pion/sdp/v3](https://github.com/pion/sdp) from 3.0.8 to 3.0.9. - [Release notes](https://github.com/pion/sdp/releases) - [Changelog](https://github.com/pion/sdp/blob/master/.goreleaser.yml) - [Commits](https://github.com/pion/sdp/compare/v3.0.8...v3.0.9) --- updated-dependencies: - dependency-name: github.com/pion/sdp/v3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ab649898b95..353ae71fa4d 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/pion/logging v0.2.2 github.com/pion/rtcp v1.2.14 github.com/pion/rtp v1.8.5 - github.com/pion/sdp/v3 v3.0.8 + github.com/pion/sdp/v3 v3.0.9 github.com/pion/webrtc/v3 v3.2.22 github.com/stretchr/testify v1.9.0 golang.org/x/crypto v0.21.0 diff --git a/go.sum b/go.sum index 9987aff719f..500433d18ee 100644 --- a/go.sum +++ b/go.sum @@ -157,8 +157,8 @@ github.com/pion/sctp v1.8.5/go.mod h1:SUFFfDpViyKejTAdwD1d/HQsCu+V/40cCs2nZIvC3s github.com/pion/sctp v1.8.8 h1:5EdnnKI4gpyR1a1TwbiS/wxEgcUWBHsc7ILAjARJB+U= github.com/pion/sctp v1.8.8/go.mod h1:igF9nZBrjh5AtmKc7U30jXltsFHicFCXSmWA2GWRaWs= github.com/pion/sdp/v3 v3.0.6/go.mod h1:iiFWFpQO8Fy3S5ldclBkpXqmWy02ns78NOKoLLL0YQw= -github.com/pion/sdp/v3 v3.0.8 h1:yd/wkrS0nzXEAb+uwv1TL3SG/gzsTiXHVOtXtD7EKl0= -github.com/pion/sdp/v3 v3.0.8/go.mod h1:B5xmvENq5IXJimIO4zfp6LAe1fD9N+kFv+V/1lOdz8M= +github.com/pion/sdp/v3 v3.0.9 h1:pX++dCHoHUwq43kuwf3PyJfHlwIj4hXA7Vrifiq0IJY= +github.com/pion/sdp/v3 v3.0.9/go.mod h1:B5xmvENq5IXJimIO4zfp6LAe1fD9N+kFv+V/1lOdz8M= github.com/pion/srtp/v2 v2.0.18 h1:vKpAXfawO9RtTRKZJbG4y0v1b11NZxQnxRl85kGuUlo= github.com/pion/srtp/v2 v2.0.18/go.mod h1:0KJQjA99A6/a0DOVTu1PhDSw0CXF2jTkqOoMg3ODqdA= github.com/pion/stun v0.6.1 h1:8lp6YejULeHBF8NmV8e2787BogQhduZugh5PdhDyyN4= From 56261cc5b25faeee6b418dedf7e23f722d10cb6d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Apr 2024 19:39:00 +0200 Subject: [PATCH 15/15] build(deps): bump golang.org/x/term from 0.18.0 to 0.19.0 (#3191) --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 353ae71fa4d..100435314e5 100644 --- a/go.mod +++ b/go.mod @@ -28,8 +28,8 @@ require ( github.com/pion/webrtc/v3 v3.2.22 github.com/stretchr/testify v1.9.0 golang.org/x/crypto v0.21.0 - golang.org/x/sys v0.18.0 - golang.org/x/term v0.18.0 + golang.org/x/sys v0.19.0 + golang.org/x/term v0.19.0 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index 500433d18ee..aa73b0ccef8 100644 --- a/go.sum +++ b/go.sum @@ -268,8 +268,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -280,8 +280,8 @@ golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= -golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= -golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=