Parcourir la source

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

Dominic Szablewski il y a 10 ans
Parent
révision
8216df3159
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      jsmpg.js

+ 1 - 1
jsmpg.js Voir le fichier

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