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"
@@ -79,18 +81,18 @@ func main() {
}
// extract access unit from RTP packets
au, err := rtpDec.Decode(pkt)
if err != nil {
if err != rtph265.ErrNonStartingPacketAndNoPrevious && err != rtph265.ErrMorePacketsNeeded {
log.Printf("ERR: %v", err)
au, err2 := rtpDec.Decode(pkt)
if err2 != nil {
if !errors.Is(err2, rtph265.ErrNonStartingPacketAndNoPrevious) && !errors.Is(err2, rtph265.ErrMorePacketsNeeded) {
log.Printf("ERR: %v", err2)
}
return
}
// encode the access unit into MPEG-TS
err = mpegtsMuxer.writeH265(au, pts)
if err != nil {
log.Printf("ERR: %v", err)
err2 = mpegtsMuxer.writeH265(au, pts)
if err2 != nil {
log.Printf("ERR: %v", err2)
return
}