GES_TYPE_FORMATTER);
#define _GET_PRIV(o)\
- (G_TYPE_INSTANCE_GET_PRIVATE ((o), GES_TYPE_BASE_XML_FORMATTER, GESBaseXmlFormatterPrivate))
+ (((GESBaseXmlFormatter*) o)->priv)
-static void _loading_done (GESFormatter * self);
+
+static gboolean _loading_done_cb (GESFormatter * self);
typedef struct PendingEffects
{
if (g_hash_table_size (priv->assetid_pendingclips) == 0 &&
priv->pending_assets == NULL)
- g_idle_add ((GSourceFunc) _loading_done, self);
+ g_idle_add ((GSourceFunc) _loading_done_cb, g_object_ref (self));
return TRUE;
}
static void
ges_base_xml_formatter_init (GESBaseXmlFormatter * self)
{
- GESBaseXmlFormatterPrivate *priv = _GET_PRIV (self);
+ GESBaseXmlFormatterPrivate *priv;
+
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
+ GES_TYPE_BASE_XML_FORMATTER, GESBaseXmlFormatterPrivate);
+
+ priv = self->priv;
priv->check_only = FALSE;
priv->parsecontext = NULL;
static void
_loading_done (GESFormatter * self)
{
- GESBaseXmlFormatterPrivate *priv = _GET_PRIV (self);
+ GESBaseXmlFormatterPrivate *priv = GES_BASE_XML_FORMATTER (self)->priv;
if (priv->parsecontext)
g_markup_parse_context_free (priv->parsecontext);
ges_project_set_loaded (self->project, self);
}
+static gboolean
+_loading_done_cb (GESFormatter * self)
+{
+ _loading_done (self);
+ g_object_unref (self);
+
+ return FALSE;
+}
+
static void
_set_child_property (GQuark field_id, const GValue * value,
GESTrackElement * effect)