// final int currentFrame = fpc.mapTimeToFrame( mp.getMediaTime() );
// if( currentFrame != FramePositioningControl.FRAME_UNKNOWN ) {
// System.err.println( "currentFrame = "+currentFrame+" so delta is " + (frameIdx - currentFrame) );
// skip( frameIdx - currentFrame );
// } else { // ok, try the cheesy way
final FrameRateControl frc = getFrameRateCtrl();
if( frc != null ) {
float fps;
fps = frc.getPreferredFrameRate();
if( fps <= 0f ) {
fps = frc.getFrameRate() / mp.getRate();
}
if( fps > 0f ) { // sucky fobs returns 0f instead of -1f!!!
System.err.println( "frameIdx " + frameIdx + "; fps = "+fps+ "; frameIdx / fps = "+(frameIdx / fps));
mp.setMediaTime( new Time( frameIdx / fps ));
}