summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXerxes Rånby <[email protected]>2013-04-29 19:13:53 +0200
committerXerxes Rånby <[email protected]>2013-05-10 09:39:50 +0200
commit170826d2e202a9938595017b9621a25a6f36a50b (patch)
tree925f55af10e7f35b1d1c65b22e5993edd393019a
parent15e8490a6367129ce4cb39f41d40bcb88639b714 (diff)
FFMPEGMediaPlayer: Workaround forward seek delay caused by video sync.
Prevent the video sync code to delay a frame more than 1 second. Signed-off-by: Xerxes Rånby <[email protected]>
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java
index 06fb9fd96..7f17e6234 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java
@@ -403,7 +403,7 @@ public class FFMPEGMediaPlayer extends EGLMediaPlayerImpl {
final long dt = (long) ( (float) ( pts_d - now_d ) / getPlaySpeed() ) ;
lastVideoTime = now;
// System.err.println("s: pts-v "+pts+", pts-d "+pts_d+", now_d "+now_d+", dt "+dt);
- if(dt>dt_d) {
+ if(dt>dt_d && dt<1000 ) {
try {
Thread.sleep(dt-dt_d);
} catch (InterruptedException e) { }