better handling of corrupt swf files

This commit is contained in:
honfika
2014-07-25 22:12:46 +02:00
parent f6969d442a
commit 1bd0504402
37 changed files with 2416 additions and 2349 deletions

View File

@@ -54,6 +54,7 @@ import java.awt.geom.AffineTransform;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
@@ -213,7 +214,7 @@ public final class ImagePanel extends JPanel implements ActionListener, MediaDis
Timeline tim = ((Timelined) timelined).getTimeline();
BoundedTag bounded = (BoundedTag) timelined;
RECT rect = bounded.getRect();
RECT rect = bounded.getRect(new HashSet<BoundedTag>());
int width = rect.getWidth();
double scale = 1.0;
/*if (width > swf.displayRect.getWidth()) {
@@ -495,7 +496,7 @@ public final class ImagePanel extends JPanel implements ActionListener, MediaDis
if (img == null) {
if (drawable instanceof BoundedTag) {
BoundedTag bounded = (BoundedTag) drawable;
RECT rect = bounded.getRect();
RECT rect = bounded.getRect(new HashSet<BoundedTag>());
if (rect == null) { //??? Why?
rect = new RECT(0, 0, 1, 1);
}