Browse Source

[Bugfix] Fixed a problem with recursive seeking and unhandled EOFException("[JUMP]").

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2622 3789f03b-4d11-0410-bbf8-ca57d06f2519
tags/v0.0.90
Constantin Kaplinsky 16 years ago
parent
commit
e0fd2da47e

+ 1
- 1
java/src/com/tightvnc/rfbplayer/FbsConnection.java View File

@@ -92,7 +92,7 @@ public class FbsConnection {
}

// Seek to the specified position.
fbs.setTimeOffset(timeOffset);
fbs.setTimeOffset(timeOffset, false);
return fbs;
}


+ 6
- 4
java/src/com/tightvnc/rfbplayer/FbsInputStream.java View File

@@ -167,11 +167,13 @@ class FbsInputStream extends InputStream {
return (long)(off * playbackSpeed);
}

public synchronized void setTimeOffset(long pos) {
public synchronized void setTimeOffset(long pos, boolean allowJump) {
seekOffset = (long)(pos / playbackSpeed);
long minJumpForwardOffset = timeOffset + (long)(10000 / playbackSpeed);
if (seekOffset < timeOffset || seekOffset > minJumpForwardOffset) {
farSeeking = true;
if (allowJump) {
long minJumpForwardOffset = timeOffset + (long)(10000 / playbackSpeed);
if (seekOffset < timeOffset || seekOffset > minJumpForwardOffset) {
farSeeking = true;
}
}
notify();
}

+ 1
- 1
java/src/com/tightvnc/rfbplayer/RfbPlayer.java View File

@@ -256,7 +256,7 @@ public class RfbPlayer extends java.applet.Applet
}

public void setPos(long pos) {
fbs.setTimeOffset(pos);
fbs.setTimeOffset(pos, true);
}

public void updatePos() {

Loading…
Cancel
Save