};
static int definedactions = sizeof(actions)/sizeof(struct Action);
-ActionTAG* swf_GetActions(TAG*tag)
+ActionTAG* swf_ActionGet(TAG*tag)
{
U8 op = 1;
int length;
length = swf_GetU16(tag);
if(length) {
- int t;
data = malloc(length);
- for(t=0;t<length;t++)
- data[t] = swf_GetU8(tag);
+ swf_GetBlock(tag, data, length);
} else {
data = 0;
}
return tmp.next;
}
-void swf_SetActions(TAG*tag, ActionTAG*action)
+void swf_ActionFree(ActionTAG*action)
+{
+ while(action)
+ {
+ ActionTAG*tmp;
+ if(action->data && action->data != action->tmp)
+ free(action->data);
+ tmp = action;
+ action=action->next;
+ free(tmp);
+ }
+}
+
+void swf_ActionSet(TAG*tag, ActionTAG*action)
{
while(action)
{