1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-08 17:55:59 +01:00

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

View file

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