mirror of
https://github.com/zhaarey/go-mp4tag.git
synced 2025-10-23 15:11:07 +00:00
- 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:
11
mp4tag.go
11
mp4tag.go
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user