diff --git a/mp4.go b/mp4.go index bc0286b..6523397 100644 --- a/mp4.go +++ b/mp4.go @@ -149,8 +149,8 @@ func (m metadataMP4) readAtomData(r io.ReadSeeker, name string, size uint32, pro // "data" + size (4 bytes each) b = b[8:] - if len(b) < 3 { - return fmt.Errorf("invalid encoding: expected at least %d bytes, for class, got %d", 3, len(b)) + if len(b) < 4 { + return fmt.Errorf("invalid encoding: expected at least %d bytes, for class, got %d", 4, len(b)) } class := getInt(b[1:4]) var ok bool