diff --git a/codec/h264/h264dec/pps.go b/codec/h264/h264dec/pps.go index aeea8a60..67b1abf2 100644 --- a/codec/h264/h264dec/pps.go +++ b/codec/h264/h264dec/pps.go @@ -54,7 +54,7 @@ func NewPPS(br *bits.BitReader, chromaFormat int) (*PPS, error) { if pps.SliceGroupMapType == 0 { 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 { 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) // rbspTrailingBits() }