From 7d0c81f28d44179c7dafeeff1f3787f8aec622aa Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 8 Jul 2014 10:50:52 +0200 Subject: Findbugs.increment_volatile: Use AtomicInteger or add comment that operation is safe! --- src/jogl/classes/jogamp/opengl/openal/av/ALAudioSink.java | 2 +- src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/jogl') diff --git a/src/jogl/classes/jogamp/opengl/openal/av/ALAudioSink.java b/src/jogl/classes/jogamp/opengl/openal/av/ALAudioSink.java index ac55fcf98..330c4f044 100644 --- a/src/jogl/classes/jogamp/opengl/openal/av/ALAudioSink.java +++ b/src/jogl/classes/jogamp/opengl/openal/av/ALAudioSink.java @@ -737,7 +737,7 @@ public class ALAudioSink implements AudioSink { throw new RuntimeException(getThreadName()+": ALError "+toHexString(alErr)+" while queueing buffer "+toHexString(alBufferNames[0])+". "+this); } alBufferBytesQueued += byteCount; - enqueuedFrameCount++; + enqueuedFrameCount++; // safe: only written-to while locked! if(DEBUG_TRACE) { System.err.println(">> "+alFrame.alBuffer+" -> "+shortString()+" @ "+getThreadName()); diff --git a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java index f36681e3b..e5369e108 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java +++ b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java @@ -1050,7 +1050,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer { } private final void newFrameAvailable(final TextureFrame frame, final long currentTimeMillis) { - decodedFrameCount++; + decodedFrameCount++; // safe: only written-to either from stream-worker or user thread if( 0 == frame.getDuration() ) { // patch frame duration if not set already frame.setDuration( (int) frame_duration ); } -- cgit v1.2.3