chore: pin GH commits and switch to golangci-lint (#4444)
* chore: pin GH commits * switch to golangci-lint-action * fix lint issues
This commit is contained in:
@@ -278,9 +278,10 @@ func IsH264KeyFrame(payload []byte) bool {
|
||||
return false
|
||||
}
|
||||
offset := 0
|
||||
if nalu == 26 {
|
||||
switch nalu {
|
||||
case 26:
|
||||
offset = 3
|
||||
} else if nalu == 27 {
|
||||
case 27:
|
||||
offset = 4
|
||||
}
|
||||
if offset >= int(length) {
|
||||
@@ -426,10 +427,10 @@ func IsH265KeyFrame(payload []byte) (kf bool) {
|
||||
return false
|
||||
}
|
||||
naluType := (payload[0] & 0x7E) >> 1
|
||||
switch {
|
||||
case naluType == 33 || naluType == 34:
|
||||
switch naluType {
|
||||
case 33, 34:
|
||||
return true
|
||||
case naluType == 48: // AP
|
||||
case 48: // AP
|
||||
idx := 2
|
||||
for idx < len(payload)-2 {
|
||||
// TODO: check the DONL field (controlled by sprop-max-don-diff)
|
||||
@@ -446,7 +447,7 @@ func IsH265KeyFrame(payload []byte) (kf bool) {
|
||||
}
|
||||
return false
|
||||
|
||||
case naluType == 49: // FU
|
||||
case 49: // FU
|
||||
if len(payload) < 3 {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user