This commit is contained in:
deepch
2024-01-08 17:35:54 +03:00
parent 9d21d056dd
commit 975d994507
9 changed files with 452 additions and 64 deletions

View File

@@ -665,11 +665,19 @@ func (self CodecData) AVCDecoderConfRecordBytes() []byte {
}
func (self CodecData) SPS() []byte {
return self.RecordInfo.SPS[0]
if len(self.RecordInfo.SPS) > 0 {
return self.RecordInfo.SPS[0]
}
return []byte{0}
}
func (self CodecData) PPS() []byte {
return self.RecordInfo.PPS[0]
if len(self.RecordInfo.PPS) > 0 {
return self.RecordInfo.PPS[0]
}
return []byte{0}
}
func (self CodecData) Width() int {