From 170826d2e202a9938595017b9621a25a6f36a50b Mon Sep 17 00:00:00 2001 From: Xerxes Rånby Date: Mon, 29 Apr 2013 19:13:53 +0200 Subject: FFMPEGMediaPlayer: Workaround forward seek delay caused by video sync. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prevent the video sync code to delay a frame more than 1 second. Signed-off-by: Xerxes Rånby --- src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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) { } -- cgit v1.2.3