From 47cc0c54e8e97763a0648b5fb500cd491af7099b Mon Sep 17 00:00:00 2001 From: Brad Hards Date: Mon, 11 Mar 2024 09:12:36 +1100 Subject: [PATCH] saiz: add sample_count to box structure This is useful when the `default_sample_info_size` is used and there are no entries in the `sample_info_size` array. --- src/parsing/saiz.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parsing/saiz.js b/src/parsing/saiz.js index 06a6cb50..8aea5286 100644 --- a/src/parsing/saiz.js +++ b/src/parsing/saiz.js @@ -4,10 +4,10 @@ BoxParser.createFullBoxCtor("saiz", function(stream) { this.aux_info_type_parameter = stream.readUint32(); } this.default_sample_info_size = stream.readUint8(); - var count = stream.readUint32(); + this.sample_count = stream.readUint32(); this.sample_info_size = []; if (this.default_sample_info_size === 0) { - for (var i = 0; i < count; i++) { + for (var i = 0; i < this.sample_count; i++) { this.sample_info_size[i] = stream.readUint8(); } }