aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes
diff options
context:
space:
mode:
authorXerxes Rånby <[email protected]>2013-05-12 11:58:50 +0200
committerXerxes Rånby <[email protected]>2013-05-12 11:58:50 +0200
commitf4ab6922a93d349ee5d1a9a90206c6f80ee0c281 (patch)
tree9e971e2dabd45fb601403becb42ad0f5ee8f4511 /src/jogl/classes
parent062f3e9e1ecfeb63ea61eb540d94d17a2de1412a (diff)
FFMPEGMediaPlayer: Limit video sync delay to 47ms in order to fix audio buffer underrun.
Signed-off-by: Xerxes Rånby <[email protected]>
Diffstat (limited to 'src/jogl/classes')
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java4
1 files changed, 2 insertions, 2 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 2c7134a44..68914639d 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java
@@ -538,8 +538,8 @@ public class FFMPEGMediaPlayer extends EGLMediaPlayerImpl {
// Try sync video to audio
final long now_d = now - lastAudioTime;
final long pts_d = pts - lastAudioPTS - 444; /* hack 444 == play video 444ms ahead of audio */
- //final long dt = Math.min(46, Math.abs( (long) ( (float) ( pts_d - now_d ) / getPlaySpeed() ) ) ) ;
- final long dt = (long) ( (float) ( pts_d - now_d ) / getPlaySpeed() ) ;
+ final long dt = Math.min(47, (long) ( (float) ( pts_d - now_d ) / getPlaySpeed() ) ) ;
+ //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);