Skip to content

Commit

Permalink
Modify SEIG parsing to handle skip / crypt block byte.
Browse files Browse the repository at this point in the history
Modulus operator on the second half of the byte lead to inaccurate values.
  • Loading branch information
itsjamie authored and tobbee committed Nov 8, 2024
1 parent 89f6d3f commit ee407da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mp4/samplegroupentries.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func DecodeSeigSampleGroupEntry(name string, length uint32, sr bits.SliceReader)
_ = sr.ReadUint8() // Reserved
byteTwo := sr.ReadUint8()
s.CryptByteBlock = byteTwo >> 4
s.SkipByteBlock = byteTwo % 0xf
s.SkipByteBlock = byteTwo & 0xf
s.IsProtected = sr.ReadUint8()
s.PerSampleIVSize = sr.ReadUint8()
s.KID = UUID(sr.ReadBytes(16))
Expand Down

0 comments on commit ee407da

Please sign in to comment.