Open mjs opened 5 years ago
So do you want these functions to return an error value in addition to the value they currently return? https://github.com/TheCacophonyProject/go-cptv/blob/ae7134e91a7107a0c98be21af944f9ee74ff889d/reader.go#L137-L142
For example
func (r *Reader) PreviewSecs() (int, error) {
secs, err := r.header.Uint8(PreviewSecs)
return int(secs), err
}
If out of range values are provided for some fields (e.g.
PreviewSecs
is great than 255) the value will silently wrapped around. An error should be returned instead.