codec/h264/h264dec: fixed some bugs found by testing

This commit is contained in:
Saxon 2019-08-05 13:59:08 +09:30
parent 401f75a712
commit 2473b9ee0a
1 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ func NewPPS(br *bits.BitReader, chromaFormat int) (*PPS, error) {
if pps.SliceGroupMapType == 0 { if pps.SliceGroupMapType == 0 {
for iGroup := 0; iGroup <= pps.NumSliceGroupsMinus1; iGroup++ { for iGroup := 0; iGroup <= pps.NumSliceGroupsMinus1; iGroup++ {
pps.RunLengthMinus1[iGroup] = int(r.readUe()) pps.RunLengthMinus1 = append(pps.RunLengthMinus1, int(r.readUe()))
} }
} else if pps.SliceGroupMapType == 2 { } else if pps.SliceGroupMapType == 2 {
for iGroup := 0; iGroup < pps.NumSliceGroupsMinus1; iGroup++ { for iGroup := 0; iGroup < pps.NumSliceGroupsMinus1; iGroup++ {
@ -115,8 +115,8 @@ func NewPPS(br *bits.BitReader, chromaFormat int) (*PPS, error) {
} }
} }
} }
pps.SecondChromaQpIndexOffset = r.readSe()
} }
pps.SecondChromaQpIndexOffset = r.readSe()
moreRBSPData(br) moreRBSPData(br)
// rbspTrailingBits() // rbspTrailingBits()
} }