]> source.dussan.org Git - tigervnc.git/commitdiff
[Bugfix] Fixed a problem with recursive seeking and unhandled EOFException("[JUMP]").
authorConstantin Kaplinsky <const@tightvnc.com>
Mon, 23 Jun 2008 13:57:37 +0000 (13:57 +0000)
committerConstantin Kaplinsky <const@tightvnc.com>
Mon, 23 Jun 2008 13:57:37 +0000 (13:57 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2622 3789f03b-4d11-0410-bbf8-ca57d06f2519

java/src/com/tightvnc/rfbplayer/FbsConnection.java
java/src/com/tightvnc/rfbplayer/FbsInputStream.java
java/src/com/tightvnc/rfbplayer/RfbPlayer.java

index b47ea56fc939ca1c771ca1da66e17d6533b15e76..5bbf4e0c1feab8548b8ffb28afccbf8a7038ffc9 100644 (file)
@@ -92,7 +92,7 @@ public class FbsConnection {
     }
 
     // Seek to the specified position.
-    fbs.setTimeOffset(timeOffset);
+    fbs.setTimeOffset(timeOffset, false);
     return fbs;
   }
 
index 2077bc5aae86c7eba274d5ac7bc2eeab37fe03e4..f5f4b391eb0ddee49d6ca406d802f6931d8d7e18 100644 (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();
   }
index 6cdd386f584e2d8b36a9a3d0911fa45b666b4358..e696d95f62cade376daedb18dc893751a6470933 100644 (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() {