validate: Attach overrides before calling monitor.setup()

This commit is contained in:
Thibault Saunier 2017-06-13 16:08:23 -04:00
parent 9c5fb0c058
commit e0484a7cdd
2 changed files with 8 additions and 2 deletions

View file

@ -85,7 +85,5 @@ gst_validate_monitor_factory_create (GstObject * target,
g_assert_not_reached (); g_assert_not_reached ();
} }
g_object_set_data ((GObject *) target, "validate-monitor", monitor);
gst_validate_override_registry_attach_overrides (monitor);
return monitor; return monitor;
} }

View file

@ -27,6 +27,7 @@
#include "gst-validate-internal.h" #include "gst-validate-internal.h"
#include "gst-validate-monitor.h" #include "gst-validate-monitor.h"
#include "gst-validate-override-registry.h"
/** /**
* SECTION:gst-validate-monitor * SECTION:gst-validate-monitor
@ -180,6 +181,7 @@ static GObject *
gst_validate_monitor_constructor (GType type, guint n_construct_params, gst_validate_monitor_constructor (GType type, guint n_construct_params,
GObjectConstructParam * construct_params) GObjectConstructParam * construct_params)
{ {
GstObject *target;
GstValidateMonitor *monitor = GstValidateMonitor *monitor =
GST_VALIDATE_MONITOR_CAST (G_OBJECT_CLASS (parent_class)->constructor GST_VALIDATE_MONITOR_CAST (G_OBJECT_CLASS (parent_class)->constructor
(type, (type,
@ -200,7 +202,13 @@ gst_validate_monitor_constructor (GType type, guint n_construct_params,
} }
} }
gst_validate_override_registry_attach_overrides (monitor);
gst_validate_monitor_setup (monitor); gst_validate_monitor_setup (monitor);
target = gst_validate_monitor_get_target (monitor);
g_object_set_data ((GObject *) target, "validate-monitor", monitor);
gst_object_unref (target);
return (GObject *) monitor; return (GObject *) monitor;
} }