Browse Source

Fix jumping to wrong frame in exact mode; see #9

Dominic Szablewski 10 years ago
parent
commit
8216df3159
1 changed files with 1 additions and 1 deletions
  1. 1 1
      jsmpg.js

+ 1 - 1
jsmpg.js View File

@@ -374,7 +374,7 @@ jsmpeg.prototype.seekToFrame = function(seekFrame, seekExact) {
374 374
 	// If we're seeking to the exact frame, we may have to decode some more frames before
375 375
 	// the one we want
376 376
 	if( seekExact ) {
377
-		for( var frame = target.frame; frame < seekFrame-1; frame++ ) {
377
+		for( var frame = target.frame; frame < seekFrame; frame++ ) {
378 378
 			this.decodePicture(DECODE_SKIP_OUTPUT);
379 379
 			this.findStartCode(START_PICTURE);
380 380
 		}