applied getinfo_crash.patch and info_only.patch by Ricardo Pedroso
[swftools.git] / src / pdf2swf.c
index 4255fbf..f2425c7 100644 (file)
@@ -640,18 +640,20 @@ int main(int argn, char *argv[])
        exit(1);
     }
 
-    if(!outputname)
-    {
-       if(filename) {
-           outputname = stripFilename(filename, ".swf");
-           msg("<notice> Output filename not given. Writing to %s", outputname);
-       } 
-    }
-       
-    if(!outputname)
-    {
-       fprintf(stderr, "Please use -o to specify an output file\n");
-       exit(1);
+    if (!info_only) {
+        if(!outputname)
+        {
+            if(filename) {
+                outputname = stripFilename(filename, ".swf");
+                msg("<notice> Output filename not given. Writing to %s", outputname);
+            } 
+        }
+            
+        if(!outputname)
+        {
+            fprintf(stderr, "Please use -o to specify an output file\n");
+            exit(1);
+        }
     }
 
     // test if the page range is o.k.