From c95e35cc5bfdc6bd019fed45d6d16f60a6d741a0 Mon Sep 17 00:00:00 2001 From: dofuuz <8174871+dofuuz@users.noreply.github.com> Date: Fri, 26 Apr 2024 23:06:39 +0900 Subject: [PATCH] Fix problem that every instance shares same items list --- src/isofile-item-processing.js | 2 -- src/isofile.js | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/isofile-item-processing.js b/src/isofile-item-processing.js index 0fbbd748..55c16d00 100644 --- a/src/isofile-item-processing.js +++ b/src/isofile-item-processing.js @@ -1,5 +1,3 @@ -ISOFile.prototype.items = []; -ISOFile.prototype.entity_groups = []; /* size of the buffers allocated for samples */ ISOFile.prototype.itemsDataSize = 0; diff --git a/src/isofile.js b/src/isofile.js index a56b4786..545539e4 100644 --- a/src/isofile.js +++ b/src/isofile.js @@ -43,6 +43,10 @@ var ISOFile = function (stream) { this.nextMoofNumber = 0; /* Boolean indicating if the initial list of items has been produced */ this.itemListBuilt = false; + /* Array of items */ + this.items = []; + /* Array of entity groups */ + this.entity_groups = []; /* Callback called when the sidx box is entirely parsed */ this.onSidx = null; /* Boolean keeping track of the call to onSidx, to avoid double calls */