From a0b23035bf9de987f5ad1b00fe3630c102f4e513 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 11 Dec 2013 21:09:59 +0100 Subject: Bug 918: Fix EOS Regression: Only use pts>duration for EOS if duration > 0 (camera or other sources may not have duration) Regression of commit 8a8ed735f6631b2da7bf605c5c3dda4e0fc13905 --- src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/jogl/classes') diff --git a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java index e6a0012d3..0de308cd1 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java +++ b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java @@ -816,7 +816,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer { final long currentTimeMillis = Platform.currentTimeMillis(); if( TimeFrameI.END_OF_STREAM_PTS == video_pts || - duration <= video_pts || maxNullFrameCountUntilEOS <= nullFrameCount ) + ( duration > 0 && duration <= video_pts ) || maxNullFrameCountUntilEOS <= nullFrameCount ) { // EOS if( DEBUG ) { @@ -1245,7 +1245,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer { nextFrame = null; } else { // audio only - if( TimeFrameI.END_OF_STREAM_PTS == vPTS || duration < vPTS ) { + if( TimeFrameI.END_OF_STREAM_PTS == vPTS || ( duration > 0 && duration < vPTS ) ) { audioEOS = true; } else { nullFrameCount = 0; -- cgit v1.2.3