mirror of
https://github.com/lkmio/lkm.git
synced 2025-09-27 03:26:01 +08:00
feat: 解析ps流发生err, 非解析缓冲区满错误继续推流
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
|||||||
"github.com/pion/rtp"
|
"github.com/pion/rtp"
|
||||||
"math"
|
"math"
|
||||||
"net"
|
"net"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type SetupType int
|
type SetupType int
|
||||||
@@ -84,7 +85,16 @@ func (source *BaseGBSource) Input(data []byte) error {
|
|||||||
|
|
||||||
packet := rtp.Packet{}
|
packet := rtp.Packet{}
|
||||||
_ = packet.Unmarshal(data)
|
_ = packet.Unmarshal(data)
|
||||||
return source.deMuxerCtx.Input(packet.Payload)
|
err := source.deMuxerCtx.Input(packet.Payload)
|
||||||
|
|
||||||
|
// 非解析缓冲区满的错误, 继续解析
|
||||||
|
if err != nil {
|
||||||
|
log.Sugar.Errorf("解析ps流发生err: %s source: %s", err.Error(), source.GetID())
|
||||||
|
if strings.HasPrefix(err.Error(), "probe") {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnPartPacket 部分es流回调
|
// OnPartPacket 部分es流回调
|
||||||
|
Reference in New Issue
Block a user