From dbf22543feed26a224d78656e7d9d56e9fe7f0c2 Mon Sep 17 00:00:00 2001 From: aggresss Date: Sat, 10 Feb 2024 21:37:47 +0800 Subject: [PATCH] Fix interceptor.RTCPReaderFunc typo --- dtlstransport.go | 2 +- rtpsender.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dtlstransport.go b/dtlstransport.go index a7f203eed7d..410d1645831 100644 --- a/dtlstransport.go +++ b/dtlstransport.go @@ -508,7 +508,7 @@ func (t *DTLSTransport) streamsForSSRC(ssrc SSRC, streamInfo interceptor.StreamI return nil, nil, nil, nil, err } - rtcpInterceptor := t.api.interceptor.BindRTCPReader(interceptor.RTPReaderFunc(func(in []byte, a interceptor.Attributes) (n int, attributes interceptor.Attributes, err error) { + rtcpInterceptor := t.api.interceptor.BindRTCPReader(interceptor.RTCPReaderFunc(func(in []byte, a interceptor.Attributes) (n int, attributes interceptor.Attributes, err error) { n, err = rtcpReadStream.Read(in) return n, a, err })) diff --git a/rtpsender.go b/rtpsender.go index 9a2629f9009..71be3fdb796 100644 --- a/rtpsender.go +++ b/rtpsender.go @@ -325,7 +325,7 @@ func (r *RTPSender) Send(parameters RTPSendParameters) error { ) trackEncoding.rtcpInterceptor = r.api.interceptor.BindRTCPReader( - interceptor.RTPReaderFunc(func(in []byte, a interceptor.Attributes) (n int, attributes interceptor.Attributes, err error) { + interceptor.RTCPReaderFunc(func(in []byte, a interceptor.Attributes) (n int, attributes interceptor.Attributes, err error) { n, err = trackEncoding.srtpStream.Read(in) return n, a, err }),