Skip to content

Commit

Permalink
Fixing linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pougetat committed Nov 4, 2023
1 parent 03a36c2 commit eec8077
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/flexfec/encoder_interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type FecInterceptor struct {
minNumMediaPackets uint32
}

// Option can be used to set initial options on Fec encoder interceptors.
// FecOption can be used to set initial options on Fec encoder interceptors.
type FecOption func(d *FecInterceptor) error

// FecInterceptorFactory creates new FecInterceptors.
Expand Down Expand Up @@ -64,9 +64,9 @@ func (r *FecInterceptor) BindLocalStream(info *interceptor.StreamInfo, writer in
fecPackets = r.flexFecEncoder.EncodeFec(r.packetBuffer, 2)

for _, fecPacket := range fecPackets {
result, err := writer.Write(&fecPacket.Header, fecPacket.Payload, attributes)
fecResult, fecErr := writer.Write(&fecPacket.Header, fecPacket.Payload, attributes)

if err != nil && result == 0 {
if fecErr != nil && fecResult == 0 {
break
}
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/flexfec/flexfec_coverage.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ func (p *ProtectionCoverage) ExtractMask3(fecPacketIndex uint32) uint64 {
return mask3
}

// ExtractMask3 returns the third section of the bitmask as defined by the FEC header.

Check warning on line 148 in pkg/flexfec/flexfec_coverage.go

View workflow job for this annotation

GitHub Actions / lint / Go

exported: comment on exported method ProtectionCoverage.ExtractMask3_03 should be of the form "ExtractMask3_03 ..." (revive)
// https://datatracker.ietf.org/doc/html/draft-ietf-payload-flexible-fec-scheme-03#section-4.2
func (p *ProtectionCoverage) ExtractMask3_03(fecPacketIndex uint32) uint64 {
mask := p.packetMasks[fecPacketIndex]
// We remove the first 46 bits
Expand Down
2 changes: 1 addition & 1 deletion pkg/flexfec/flexfec_encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type FlexEncoder interface {
EncodeFec(mediaPackets []rtp.Packet, numFecPackets uint32) []rtp.Packet
}

// FlexEncoder implements the Fec encoding mechanism for the "Flex" variant of FlexFec.
// FlexEncoder20 implements the Fec encoding mechanism for the "Flex" variant of FlexFec.
type FlexEncoder20 struct {
fecBaseSn uint16
payloadType uint8
Expand Down

0 comments on commit eec8077

Please sign in to comment.