Skip to content

Commit

Permalink
fixed onmessage handler for archives
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Zhavoronkov committed Dec 12, 2019
1 parent 3ca071c commit e781938
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions cvat-data/src/js/cvat-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,12 @@ class FrameProvider {
if (this._decodingBlocks[`${start}:${end}`].resolveCallback) {
this._decodingBlocks[`${start}:${end}`].resolveCallback(event.data.index);
}

if (event.data.index in this._promisedFrames) {
this._promisedFrames[event.data.index].resolve(this._frames[event.data.index]);
delete this._promisedFrames[event.data.index];
}

if (event.data.isEnd){
const t = performance.now() - t0;
console.log(`Decode time of archive chunk ${Math.floor((start+1)/ this._blockSize)}: ${t}; fps: ${36000/t}`);
Expand Down
2 changes: 1 addition & 1 deletion cvat/apps/engine/static/engine/js/cvat-core.min.js

Large diffs are not rendered by default.

0 comments on commit e781938

Please sign in to comment.