Skip to content

Commit

Permalink
Merge pull request #12 from dwdcth/2.0
Browse files Browse the repository at this point in the history
Update nalu.go
  • Loading branch information
langhuihui authored Dec 9, 2020
2 parents 9e626d8 + 2142b5c commit b7898dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nalu.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ func (r *NALU) writePicture(ts uint32, head, payload []byte) {
r.buffer = append(r.buffer, payload...)
}
func (r *NALU) WriteNALU(ts uint32, payload []byte) {
if len(payload) == 0 {
return
}
nalType := payload[0] & naluTypeBitmask
switch nalType {
case NALU_STAPA:
Expand Down

0 comments on commit b7898dc

Please sign in to comment.