mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-20 02:00:05 -08:00
modernize code (#4947)
Some checks failed
code_lint / go (push) Has been cancelled
code_lint / go_mod (push) Has been cancelled
code_lint / docs (push) Has been cancelled
code_lint / api_docs (push) Has been cancelled
code_test / test_64 (push) Has been cancelled
code_test / test_32 (push) Has been cancelled
code_test / test_e2e (push) Has been cancelled
Some checks failed
code_lint / go (push) Has been cancelled
code_lint / go_mod (push) Has been cancelled
code_lint / docs (push) Has been cancelled
code_lint / api_docs (push) Has been cancelled
code_test / test_64 (push) Has been cancelled
code_test / test_32 (push) Has been cancelled
code_test / test_e2e (push) Has been cancelled
This commit is contained in:
parent
3a4d4e1802
commit
e0f4748839
6 changed files with 19 additions and 43 deletions
|
|
@ -28,7 +28,7 @@ var errNoSupportedCodecsFrom = errors.New(
|
|||
"the stream doesn't contain any supported codec, which are currently " +
|
||||
"AV1, VP9, VP8, H265, H264, Opus, G722, G711, LPCM")
|
||||
|
||||
func uint16Ptr(v uint16) *uint16 {
|
||||
func ptrOf[T any](v T) *T {
|
||||
return &v
|
||||
}
|
||||
|
||||
|
|
@ -121,7 +121,7 @@ func setupVideoTrack(
|
|||
encoder := &rtpvp9.Encoder{
|
||||
PayloadType: 96,
|
||||
PayloadMaxSize: webrtcPayloadMaxSize,
|
||||
InitialPictureID: uint16Ptr(8445),
|
||||
InitialPictureID: ptrOf(uint16(8445)),
|
||||
}
|
||||
err := encoder.Init()
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue