Skip to content

explicit field order #70

@sunfish-shogi

Description

@sunfish-shogi

The filed order of struct is probably not guaranteed in future versions of Go compiler ???
https://stackoverflow.com/questions/32392311/reflect-type-field-order

If so, we should have order expressly.
For example:

type Emsg struct {
  FullBox               `mp4:"0,extend"`
  SchemeIdUri           string `mp4:"1,string"`
  Value                 string `mp4:"2,string"`
  Timescale             uint32 `mp4:"3,size=32"`
  PresentationTimeDelta uint32 `mp4:"4,size=32,ver=0"`
  PresentationTime      uint64 `mp4:"5,size=64,ver=1"`
  EventDuration         uint32 `mp4:"6,size=32"`
  Id                    uint32 `mp4:"7,size=32"`
  MessageData           []byte `mp4:"8,size=8,string"`
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions