Skip to content

Commit 895a646

Browse files
committed
fix: handle invalid year in MP4 metadata reading fixe:#823
1 parent 00025b2 commit 895a646

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/exif/direct.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ func readMP4Metadata(r io.Reader) (*assets.Metadata, error) {
102102
if t.Year() < 2000 {
103103
t = atom.ModificationTime
104104
}
105+
if t.Year() < 2000 {
106+
t = time.Time{}
107+
}
105108
return &assets.Metadata{DateTaken: t}, nil
106109
}
107110

0 commit comments

Comments
 (0)