mirror of
https://github.com/aler9/gortsplib
synced 2025-09-27 03:25:52 +08:00
bump golangci-lint (#784)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user