summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorConstantin Kaplinsky <const@tightvnc.com>2008-06-23 13:57:37 +0000
committerConstantin Kaplinsky <const@tightvnc.com>2008-06-23 13:57:37 +0000
commite0fd2da47ef75ffb31308199f47c971cfd2c18c7 (patch)
tree189297bee3b50d12067c1be13b009f627b1ff65e /java
parent2c0d2d17d1d4e85530a13740d70cd0c6326d8459 (diff)
downloadtigervnc-e0fd2da47ef75ffb31308199f47c971cfd2c18c7.tar.gz
tigervnc-e0fd2da47ef75ffb31308199f47c971cfd2c18c7.zip
[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
Diffstat (limited to 'java')
-rw-r--r--java/src/com/tightvnc/rfbplayer/FbsConnection.java2
-rw-r--r--java/src/com/tightvnc/rfbplayer/FbsInputStream.java10
-rw-r--r--java/src/com/tightvnc/rfbplayer/RfbPlayer.java2
3 files changed, 8 insertions, 6 deletions
diff --git a/java/src/com/tightvnc/rfbplayer/FbsConnection.java b/java/src/com/tightvnc/rfbplayer/FbsConnection.java
index b47ea56f..5bbf4e0c 100644
--- a/java/src/com/tightvnc/rfbplayer/FbsConnection.java
+++ b/java/src/com/tightvnc/rfbplayer/FbsConnection.java
@@ -92,7 +92,7 @@ public class FbsConnection {
}
// Seek to the specified position.
- fbs.setTimeOffset(timeOffset);
+ fbs.setTimeOffset(timeOffset, false);
return fbs;
}
diff --git a/java/src/com/tightvnc/rfbplayer/FbsInputStream.java b/java/src/com/tightvnc/rfbplayer/FbsInputStream.java
index 2077bc5a..f5f4b391 100644
--- a/java/src/com/tightvnc/rfbplayer/FbsInputStream.java
+++ b/java/src/com/tightvnc/rfbplayer/FbsInputStream.java
@@ -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();
}
diff --git a/java/src/com/tightvnc/rfbplayer/RfbPlayer.java b/java/src/com/tightvnc/rfbplayer/RfbPlayer.java
index 6cdd386f..e696d95f 100644
--- a/java/src/com/tightvnc/rfbplayer/RfbPlayer.java
+++ b/java/src/com/tightvnc/rfbplayer/RfbPlayer.java
@@ -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() {