From 0e02bb669ce4cece288a71da3cfe278d17f00f85 Mon Sep 17 00:00:00 2001 From: Mattias Wadman Date: Wed, 4 May 2022 15:35:00 +0200 Subject: [PATCH] mp4: iinf: Only assume sub boxes for version 0 --- format/mp4/boxes.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/format/mp4/boxes.go b/format/mp4/boxes.go index bd434b2e..c3fe8fdf 100644 --- a/format/mp4/boxes.go +++ b/format/mp4/boxes.go @@ -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,