mirror of
https://github.com/aler9/gortsplib
synced 2025-10-27 17:21:22 +08:00
various performance improvements (#561)
This commit is contained in:
@@ -142,7 +142,7 @@ func (f *H265) PTSEqualsDTS(pkt *rtp.Packet) bool {
|
||||
case h265.NALUType_AggregationUnit:
|
||||
payload := pkt.Payload[2:]
|
||||
|
||||
for len(payload) > 0 {
|
||||
for {
|
||||
if len(payload) < 2 {
|
||||
return false
|
||||
}
|
||||
@@ -163,6 +163,10 @@ func (f *H265) PTSEqualsDTS(pkt *rtp.Packet) bool {
|
||||
h265.NALUType_VPS_NUT, h265.NALUType_SPS_NUT, h265.NALUType_PPS_NUT:
|
||||
return true
|
||||
}
|
||||
|
||||
if len(payload) == 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
case h265.NALUType_FragmentationUnit:
|
||||
|
||||
Reference in New Issue
Block a user