jump to multiple of framerate

This commit is contained in:
codeanticode
2012-08-15 04:54:24 +00:00
parent 59265902cf
commit a2801bdd60
@@ -292,6 +292,12 @@ public class Movie extends PImage implements PConstants {
initSink();
}
// Round the time to a multiple of the source framerate, in
// order to eliminate stutter. Suggested by Daniel Shiffman
float fps = getSourceFrameRate();
int frame = (int)(where * fps);
where = frame / fps;
boolean res;
long pos = Video.secToNanoLong(where);