diff options
author | Sven Gothel <[email protected]> | 2015-10-05 13:48:18 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-10-05 13:48:18 +0200 |
commit | 4e237f265146b4c1e00856f19a8794aabf54d12c (patch) | |
tree | faea2b8f4fd90ac9899b62e90a3ad9ac5cfc20ae /src/jogl/classes/jogamp/opengl | |
parent | 8790d4a25410c51e747f4cdd7954ef8abbb7a68b (diff) |
Bug 1239: Fix GLMediaPlayer.CameraInputScheme API doc; GLMediaPlayerImpl.updateAttributes avoid div-by-zero (fps inf)
Diffstat (limited to 'src/jogl/classes/jogamp/opengl')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java index 68d53909a..f09d289fa 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java +++ b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java @@ -1431,7 +1431,12 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer { this.fps = fps; if( 0 != fps ) { this.frame_duration = 1000f / fps; - this.maxNullFrameCountUntilEOS = MAX_FRAMELESS_MS_UNTIL_EOS / (int)this.frame_duration; + final int fdurI = (int)this.frame_duration; + if( 0 < fdurI ) { + this.maxNullFrameCountUntilEOS = MAX_FRAMELESS_MS_UNTIL_EOS / fdurI; + } else { + this.maxNullFrameCountUntilEOS = MAX_FRAMELESS_UNTIL_EOS_DEFAULT; + } } else { this.frame_duration = 0; this.maxNullFrameCountUntilEOS = MAX_FRAMELESS_UNTIL_EOS_DEFAULT; |