Skip to content

Commit

Permalink
FFMPEGMediaPlayer: Workaround forward seek delay caused by video sync.
Browse files Browse the repository at this point in the history
Prevent the video sync code to delay a frame more than 1 second.

Signed-off-by: Xerxes Rånby <xerxes@zafena.se>
  • Loading branch information
xranby committed May 10, 2013
1 parent 15e8490 commit 170826d
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -403,7 +403,7 @@ protected TextureSequence.TextureFrame getNextTextureImpl(GL gl, boolean blockin
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) { }
Expand Down

0 comments on commit 170826d

Please sign in to comment.