From 8d0a1c8d528ff52baf142c7f67e38247268c1822 Mon Sep 17 00:00:00 2001 From: Ben Boyle Date: Thu, 6 Oct 2016 14:40:40 +1000 Subject: [PATCH] reset intraFrames in jsmpeg constructor fix #93 by initialising intraFrames property in jsmpeg constructor fixes seekToFrame behaviour when loading more than one video --- jsmpg.js | 1 + 1 file changed, 1 insertion(+) diff --git a/jsmpg.js b/jsmpg.js index 8b3eee9c..3fc1687f 100755 --- a/jsmpg.js +++ b/jsmpg.js @@ -42,6 +42,7 @@ var jsmpeg = window.jsmpeg = function( url, opts ) { this.blockData = new Int32Array(64); this.zeroBlockData = new Int32Array(64); this.fillArray(this.zeroBlockData, 0); + this.intraFrames = []; // use WebGL for YCbCrToRGBA conversion if possible (much faster) if( !opts.forceCanvas2D && this.initWebGL() ) {