From 8216df31594e37bc25e1848b98bb7cd4cb5cafae Mon Sep 17 00:00:00 2001 From: Dominic Szablewski Date: Wed, 3 Jun 2015 12:34:39 +0200 Subject: [PATCH] Fix jumping to wrong frame in exact mode; see #9 --- jsmpg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsmpg.js b/jsmpg.js index b1b21692..8bf101a1 100755 --- a/jsmpg.js +++ b/jsmpg.js @@ -374,7 +374,7 @@ jsmpeg.prototype.seekToFrame = function(seekFrame, seekExact) { // If we're seeking to the exact frame, we may have to decode some more frames before // the one we want if( seekExact ) { - for( var frame = target.frame; frame < seekFrame-1; frame++ ) { + for( var frame = target.frame; frame < seekFrame; frame++ ) { this.decodePicture(DECODE_SKIP_OUTPUT); this.findStartCode(START_PICTURE); }