bump golangci-lint (#203)

This commit is contained in:
Alessandro Ros
2025-05-23 14:49:00 +02:00
committed by GitHub
parent 51847e390c
commit 464c9bec91
9 changed files with 68 additions and 62 deletions

View File

@@ -144,13 +144,15 @@ func (c *SequenceHeader_ColorConfig) unmarshal(seqProfile uint8, buf []byte, pos
return err
}
switch {
case seqProfile == 0:
switch seqProfile {
case 0:
c.SubsamplingX = true
c.SubsamplingY = true
case seqProfile == 1:
case 1:
c.SubsamplingX = false
c.SubsamplingY = false
default:
if c.BitDepth == 12 {
c.SubsamplingX, err = bits.ReadFlag(buf, pos)

View File

@@ -114,9 +114,11 @@ func getPTSDTSDiff(buf []byte, sps *SPS, pps *PPS) (uint32, error) {
var v uint32
if sliceType == 0 { // B-frame
if typ == NALUType_TRAIL_N || typ == NALUType_RASL_N {
switch typ {
case NALUType_TRAIL_N, NALUType_RASL_N:
v = sps.MaxNumReorderPics[0] - uint32(len(rps.DeltaPocS1))
} else if typ == NALUType_TRAIL_R || typ == NALUType_RASL_R {
case NALUType_TRAIL_R, NALUType_RASL_R:
if len(rps.DeltaPocS0) == 0 {
return 0, fmt.Errorf("invalid DeltaPocS0")
}

View File

@@ -23,7 +23,7 @@ func (m *DefineQuantizationTable) Unmarshal(buf []byte) error {
precision := buf[0] >> 4
buf = buf[1:]
if precision != 0 {
return fmt.Errorf("Precision %d is not supported", precision)
return fmt.Errorf("precision %d is not supported", precision)
}
if len(buf) < 64 {

View File

@@ -103,7 +103,7 @@ func (ps *Parts) Unmarshal(byts []byte) error {
}
tfdt = box.(*amp4.Tfdt)
if tfdt.FullBox.Version != 1 {
if tfdt.Version != 1 {
return nil, fmt.Errorf("unsupported tfdt version")
}

View File

@@ -211,9 +211,9 @@ func (w *Writer) WriteMPEG4Audio(
for i, au := range aus {
pkts[i] = &mpeg4audio.ADTSPacket{
Type: aacCodec.Config.Type,
Type: aacCodec.Type,
SampleRate: aacCodec.SampleRate,
ChannelCount: aacCodec.Config.ChannelCount,
ChannelCount: aacCodec.ChannelCount,
AU: au,
}
}