Skip to content

Commit

Permalink
Merge pull request #46 from ZSC714725/whep-safari-1
Browse files Browse the repository at this point in the history
startcode use 00000001
  • Loading branch information
ZSC714725 authored Dec 17, 2023
2 parents 6864edc + 9e02c66 commit b5d7077
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rtc/packer.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,15 @@ func (enc *SafariHEVCRtpEncoder) Encode(msg base.RtmpMsg) ([]*rtp.Packet, error)

if hevc.IsIrapNalu(t) {
keyFrame = true
out = append(out, avc.NaluStartCode3...)
out = append(out, avc.NaluStartCode4...)
out = append(out, enc.vps...)
out = append(out, avc.NaluStartCode3...)
out = append(out, avc.NaluStartCode4...)
out = append(out, enc.sps...)
out = append(out, avc.NaluStartCode3...)
out = append(out, avc.NaluStartCode4...)
out = append(out, enc.pps...)
}

out = append(out, avc.NaluStartCode3...)
out = append(out, avc.NaluStartCode4...)
out = append(out, nal...)
})

Expand Down

0 comments on commit b5d7077

Please sign in to comment.