static void load_svg_done(GF_SceneLoader *load)
{
	SVG_SAFExternalStream *st;
	GF_SVG_Parser *parser = (GF_SVG_Parser *)load->loader_priv;
	if (!parser) return;

	gf_sm_svg_flush_state(parser);

	gf_list_del(parser->node_stack);
	gf_list_del(parser->deferred_hrefs);
	gf_list_del(parser->deferred_listeners);
	gf_list_del(parser->peeked_nodes);
	/* reset animations */
	gf_list_del(parser->deferred_animations);
	if (parser->sax_parser) {
		gf_xml_sax_del(parser->sax_parser);
	}
	st = parser->streams;
	while (st) {
		SVG_SAFExternalStream *next = st->next;
		gf_free(st->stream_name);
		gf_free(st);
		st = next;
	}
	gf_free(parser);
	load->loader_priv = NULL;
}
static void load_svg_done(GF_SceneLoader *load)
{
	SVG_SAFExternalStream *st;
	GF_SVG_Parser *parser = (GF_SVG_Parser *)load->loader_priv;
	if (!parser) return;

	gf_sm_svg_flush_state(parser);

	gf_list_del(parser->node_stack);
	gf_list_del(parser->deferred_hrefs);
	gf_list_del(parser->deferred_listeners);
	gf_list_del(parser->peeked_nodes);
	 
	gf_list_del(parser->deferred_animations);
	if (parser->sax_parser) {
		gf_xml_sax_del(parser->sax_parser);
	}
	st = parser->streams;
	while (st) {
		SVG_SAFExternalStream *next = st->next;
		gf_free(st->stream_name);
		gf_free(st);
		st = next;
	}
	gf_free(parser);
	load->loader_priv = NULL;
}