more horizontal refactoring
[swftools.git] / lib / example / protect.c
index e6127d1..684bc6d 100644 (file)
@@ -62,7 +62,7 @@ int main(int argn,char ** argv)
            if(!ret) printf("Password validation failed\n");
            else printf("Password ok\n");
 
-           swf_DeleteTag(tag);
+           swf_DeleteTag(&swf, tag);
        }
        tag = next;
     }
@@ -74,10 +74,8 @@ int main(int argn,char ** argv)
     if(fi<0) {
        fprintf(stderr, "couldn't create output file %s", outfilename);
     }
-    if(swf.compressed) 
-       {if(swf_WriteSWC(fi, &swf)<0) fprintf(stderr, "WriteSWC() failed.\n");}
-    else
-       {if(swf_WriteSWF(fi, &swf)<0) fprintf(stderr, "WriteSWF() failed.\n");}
+    if(swf_WriteSWF(fi, &swf)<0) 
+        fprintf(stderr, "WriteSWF() failed.\n");
 
     close(fi);