[fix] rtsp中关键数据解析错误时不返回错误,使rtsp能够正常转发

pull/53/head
joestarzxh 4 years ago
parent b412473a5a
commit cb7f681bae

@ -120,7 +120,7 @@ func ParseSDP2LogicContext(b []byte) (LogicContext, error) {
if md.AFmtPBase != nil {
ret.ASC, err = ParseASC(md.AFmtPBase)
if err != nil {
return ret, err
nazalog.Warnf("asc Parse error.")
}
} else {
nazalog.Warnf("aac afmtp not exist.")
@ -140,7 +140,7 @@ func ParseSDP2LogicContext(b []byte) (LogicContext, error) {
if md.AFmtPBase != nil {
ret.SPS, ret.PPS, err = ParseSPSPPS(md.AFmtPBase)
if err != nil {
return ret, err
nazalog.Warnf("avc sps pps Parse error.")
}
} else {
nazalog.Warnf("avc afmtp not exist.")
@ -150,7 +150,7 @@ func ParseSDP2LogicContext(b []byte) (LogicContext, error) {
if md.AFmtPBase != nil {
ret.VPS, ret.SPS, ret.PPS, err = ParseVPSSPSPPS(md.AFmtPBase)
if err != nil {
return ret, err
nazalog.Warnf("hevc vps sps pps Parse error.")
}
} else {
nazalog.Warnf("hevc afmtp not exist.")

@ -184,7 +184,6 @@ func ParseAFmtPBase(s string) (ret AFmtPBase, err error) {
pp = strings.TrimSpace(pp)
kv := strings.SplitN(pp, "=", 2)
if len(kv) != 2 {
err = ErrSDP
return
}
ret.Parameters[kv[0]] = kv[1]

Loading…
Cancel
Save