Skip to content

Commit

Permalink
Merge pull request #133 from abema/fix-qt
Browse files Browse the repository at this point in the history
Fix for QuickTime
  • Loading branch information
sunfish-shogi authored Mar 6, 2023
2 parents 022b000 + 566c023 commit b6a9288
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions read.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func readBoxStructureFromInternal(r io.ReadSeeker, bi *BoxInfo, path BoxPath, ha
func readBoxStructure(r io.ReadSeeker, totalSize uint64, isRoot bool, path BoxPath, ctx Context, handler ReadHandler, params []interface{}) ([]interface{}, error) {
vals := make([]interface{}, 0, 8)

for isRoot || totalSize != 0 {
for isRoot || totalSize >= SmallHeaderSize {
bi, err := ReadBoxInfo(r)
if isRoot && err == io.EOF {
return vals, nil
Expand All @@ -174,7 +174,7 @@ func readBoxStructure(r io.ReadSeeker, totalSize uint64, isRoot bool, path BoxPa
}
}

if totalSize != 0 {
if totalSize != 0 && !ctx.IsQuickTimeCompatible {
return nil, errors.New("Unexpected EOF")
}

Expand Down

0 comments on commit b6a9288

Please sign in to comment.