various small fixes

This commit is contained in:
honfika@gmail.com
2015-04-25 20:21:10 +02:00
parent 2900dd90e0
commit e700f91bf7
8 changed files with 59 additions and 28 deletions

View File

@@ -184,21 +184,30 @@ public final class FlashPlayerPanel extends Panel implements Closeable, MediaDis
@Override
public void run() {
boolean changed = false;
try {
ShockwaveFlash flash1 = flash;
if (flash1 == null) {
return;
}
boolean isPlaying = flash.IsPlaying();
if (this.isPlaying != isPlaying) {
this.isPlaying = isPlaying;
}
boolean changed = false;
int currentFrame = flash.CurrentFrame();
if (this.currentFrame != currentFrame) {
this.currentFrame = currentFrame;
changed = true;
}
boolean isPlaying = flash1.IsPlaying();
if (this.isPlaying != isPlaying) {
this.isPlaying = isPlaying;
}
if (changed) {
fireMediaDisplayStateChanged();
int currentFrame = flash1.CurrentFrame();
if (this.currentFrame != currentFrame) {
this.currentFrame = currentFrame;
changed = true;
}
if (changed) {
fireMediaDisplayStateChanged();
}
} catch (Exception ex) {
// ignore
}
}
}, 100, 100);