fi = open(filename, O_RDONLY|O_BINARY);
if (fi<=0) {
fprintf(stderr,"Couldn't open %s\n", filename);
- perror(argv[1]);
+ perror(filename);
exit(1);
}
if(swf_ReadSWF(fi,&swf)<0) {
fprintf(stderr,"%s is not a valid SWF file or contains errors.\n",argv[1]);
close(fi);
}
+ assert(swf.movieSize.xmax > swf.movieSize.xmin && swf.movieSize.ymax > swf.movieSize.ymin);
RENDERBUF buf;
swf_Render_Init(&buf, 0,0, (swf.movieSize.xmax - swf.movieSize.xmin) / 20,
(swf.movieSize.ymax - swf.movieSize.ymin) / 20, 2, 1);