Skip to content

Commit

Permalink
saiz: add sample_count to box structure
Browse files Browse the repository at this point in the history
This is useful when the `default_sample_info_size` is used and
there are no entries in the `sample_info_size` array.
  • Loading branch information
bradh committed Oct 29, 2024
1 parent 2c15bfd commit 47cc0c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/parsing/saiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit 47cc0c5

Please sign in to comment.