bump golangci-lint (#784)

This commit is contained in:
Alessandro Ros
2025-05-23 14:51:33 +02:00
committed by GitHub
parent 2694ed941f
commit b1804d77e8
72 changed files with 289 additions and 211 deletions

View File

@@ -1,6 +1,8 @@
// Package main contains an example.
package main
import (
"errors"
"log"
"github.com/bluenviron/gortsplib/v4"
@@ -91,18 +93,18 @@ func main() {
}
// extract access unit from RTP packets
au, err := h264RTPDec.Decode(pkt)
if err != nil {
if err != rtph264.ErrNonStartingPacketAndNoPrevious && err != rtph264.ErrMorePacketsNeeded {
log.Printf("ERR: %v", err)
au, err2 := h264RTPDec.Decode(pkt)
if err2 != nil {
if !errors.Is(err2, rtph264.ErrNonStartingPacketAndNoPrevious) && !errors.Is(err2, rtph264.ErrMorePacketsNeeded) {
log.Printf("ERR: %v", err2)
}
return
}
// encode the access unit into MPEG-TS
err = mpegtsMuxer.writeH264(au, pts)
if err != nil {
log.Printf("ERR: %v", err)
err2 = mpegtsMuxer.writeH264(au, pts)
if err2 != nil {
log.Printf("ERR: %v", err2)
return
}
@@ -119,16 +121,16 @@ func main() {
}
// extract access units from RTP packets
aus, err := mpeg4AudioRTPDec.Decode(pkt)
if err != nil {
log.Printf("ERR: %v", err)
aus, err2 := mpeg4AudioRTPDec.Decode(pkt)
if err2 != nil {
log.Printf("ERR: %v", err2)
return
}
// encode access units into MPEG-TS
err = mpegtsMuxer.writeMPEG4Audio(aus, pts)
if err != nil {
log.Printf("ERR: %v", err)
err2 = mpegtsMuxer.writeMPEG4Audio(aus, pts)
if err2 != nil {
log.Printf("ERR: %v", err2)
return
}