add SizeLength and IndexLength

This commit is contained in:
nareix 2016-06-07 19:33:26 +08:00
parent 9bb11c6fc4
commit 4a48b5df35

View File

@ -17,6 +17,8 @@ type Info struct {
Config []byte
SpropParameterSets [][]byte
PayloadType int
SizeLength int
IndexLength int
}
func Decode(content string) (infos []Info) {
@ -77,6 +79,10 @@ func Decode(content string) (infos []Info) {
switch key {
case "config":
info.Config, _ = hex.DecodeString(val)
case "sizelength":
info.SizeLength, _ = strconv.Atoi(val)
case "indexlength":
info.IndexLength, _ = strconv.Atoi(val)
case "sprop-parameter-sets":
fields := strings.Split(val, ",")
for _, field := range fields {