1
Fork 0

Consistently use SPS for detecting H.264 keyframes.

This was already the case for FU NALUs, but not for simple NALUs.
This commit is contained in:
Juliusz Chroboczek 2022-05-04 18:26:22 +02:00
parent 0d1b804ded
commit 40bf93cdd0
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ func Keyframe(codec string, packet *rtp.Packet) (bool, bool) {
return false, false return false, false
} else if nalu <= 23 { } else if nalu <= 23 {
// simple NALU // simple NALU
return nalu == 5, true return nalu == 7, true
} else if nalu == 24 || nalu == 25 || nalu == 26 || nalu == 27 { } else if nalu == 24 || nalu == 25 || nalu == 26 || nalu == 27 {
// STAP-A, STAP-B, MTAP16 or MTAP24 // STAP-A, STAP-B, MTAP16 or MTAP24
i := 1 i := 1