if (anim->to) {
/* now that we have a target, if there is a to value to parse, create the attribute and parse it */
gf_node_get_attribute_by_tag((GF_Node *)anim->animation_elt, TAG_SVG_ATT_to, GF_TRUE, GF_FALSE, &info);
+ if (!info.name) info.name = "to";
gf_svg_parse_attribute((GF_Node *)anim->animation_elt, &info, anim->to, anim_value_type);
if (anim_value_type==XMLRI_datatype) {
svg_post_process_href(parser, (GF_Node *) anim->target, (XMLRI*)((SMIL_AnimateValue *)info.far_ptr)->value);
if (anim->from) {
/* now that we have a target, if there is a from value to parse, create the attribute and parse it */
gf_node_get_attribute_by_tag((GF_Node *)anim->animation_elt, TAG_SVG_ATT_from, GF_TRUE, GF_FALSE, &info);
+ if (!info.name) info.name = "from";
gf_svg_parse_attribute((GF_Node *)anim->animation_elt, &info, anim->from, anim_value_type);
if (anim_value_type==XMLRI_datatype)
svg_post_process_href(parser, (GF_Node *) anim->target, (XMLRI*)((SMIL_AnimateValue *)info.far_ptr)->value);
if (anim->by) {
/* now that we have a target, if there is a by value to parse, create the attribute and parse it */
gf_node_get_attribute_by_tag((GF_Node *)anim->animation_elt, TAG_SVG_ATT_by, GF_TRUE, GF_FALSE, &info);
+ if (!info.name) info.name = "by";
gf_svg_parse_attribute((GF_Node *)anim->animation_elt, &info, anim->by, anim_value_type);
if (anim_value_type==XMLRI_datatype)
svg_post_process_href(parser, (GF_Node *) anim->target, (XMLRI*)((SMIL_AnimateValue *)info.far_ptr)->value);
if (anim->values) {
/* now that we have a target, if there is a 'values' value to parse, create the attribute and parse it */
gf_node_get_attribute_by_tag((GF_Node *)anim->animation_elt, TAG_SVG_ATT_values, GF_TRUE, GF_FALSE, &info);
+ if (!info.name) info.name = "values";
gf_svg_parse_attribute((GF_Node *)anim->animation_elt, &info, anim->values, anim_value_type);
if (anim_value_type==XMLRI_datatype) {
u32 i, count;
in_time = gf_sys_clock();
e = gf_xml_sax_parse_file(parser->sax_parser, (const char *)load->fileName, svg_progress);
+ svg_flush_animations(parser);
+ gf_sm_svg_flush_state(parser);
if (parser->last_error<0) e = parser->last_error;
-
+
if (e<0) return svg_report(parser, e, "Unable to parse file %s: %s", load->fileName, gf_xml_sax_get_error(parser->sax_parser) );
GF_LOG(GF_LOG_INFO, GF_LOG_PARSER, ("[Parser] Scene parsed and Scene Graph built in %d ms\n", gf_sys_clock() - in_time));
- svg_flush_animations(parser);
- gf_sm_svg_flush_state(parser);
return e;
}