Skip to content

Commit

Permalink
mp4: iinf: Only assume sub boxes for version 0
Browse files Browse the repository at this point in the history
  • Loading branch information
wader committed May 4, 2022
1 parent 6013588 commit 0e02bb6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions format/mp4/boxes.go
Original file line number Diff line number Diff line change
Expand Up @@ -976,10 +976,14 @@ func init() {
}
},
"iinf": func(ctx *decodeContext, d *decode.D) {
d.FieldU8("version")
version := d.FieldU8("version")
d.FieldU24("flags")
_ = d.FieldU16("entry_count")
decodeBoxes(ctx, d)
if version == 0 {
_ = d.FieldU16("entry_count")
decodeBoxes(ctx, d)
} else {
d.FieldRawLen("data", d.BitsLeft())
}
},
"iprp": decodeBoxes,
"ipco": decodeBoxes,
Expand Down

0 comments on commit 0e02bb6

Please sign in to comment.