- Issue #11 implemented.
- Fixed assignment to nil map error for the custom field.
- UpperCustom func, pass false to disable uppercasing custom tags' names for read & write.
This commit is contained in:
Sorrow446
2024-01-30 22:02:06 +00:00
committed by GitHub
parent 467689a441
commit 8773ee4341
4 changed files with 134 additions and 16 deletions

View File

@@ -7,6 +7,10 @@ import (
"os"
)
func (mp4 *MP4) UpperCustom(b bool) {
mp4.upperCustom = b
}
func (mp4 *MP4) Close() error {
return mp4.f.Close()
}
@@ -59,7 +63,12 @@ func Open(trackPath string) (*MP4, error) {
return nil, err
}
mp4 := &MP4{f: f, size : stat.Size(), path: trackPath}
mp4 := &MP4{
f: f,
size : stat.Size(),
path: trackPath,
upperCustom: true,
}
err = mp4.checkHeader()
if err != nil {
f.Close()