From e0484a7cdd45050a165b20c5437f949d207890b3 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Tue, 13 Jun 2017 16:08:23 -0400 Subject: [PATCH] validate: Attach overrides before calling monitor.setup() --- validate/gst/validate/gst-validate-monitor-factory.c | 2 -- validate/gst/validate/gst-validate-monitor.c | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/validate/gst/validate/gst-validate-monitor-factory.c b/validate/gst/validate/gst-validate-monitor-factory.c index e343273f3e..2597ca0b92 100644 --- a/validate/gst/validate/gst-validate-monitor-factory.c +++ b/validate/gst/validate/gst-validate-monitor-factory.c @@ -85,7 +85,5 @@ gst_validate_monitor_factory_create (GstObject * target, g_assert_not_reached (); } - g_object_set_data ((GObject *) target, "validate-monitor", monitor); - gst_validate_override_registry_attach_overrides (monitor); return monitor; } diff --git a/validate/gst/validate/gst-validate-monitor.c b/validate/gst/validate/gst-validate-monitor.c index 925eded0c5..04ff66db15 100644 --- a/validate/gst/validate/gst-validate-monitor.c +++ b/validate/gst/validate/gst-validate-monitor.c @@ -27,6 +27,7 @@ #include "gst-validate-internal.h" #include "gst-validate-monitor.h" +#include "gst-validate-override-registry.h" /** * SECTION:gst-validate-monitor @@ -180,6 +181,7 @@ static GObject * gst_validate_monitor_constructor (GType type, guint n_construct_params, GObjectConstructParam * construct_params) { + GstObject *target; GstValidateMonitor *monitor = GST_VALIDATE_MONITOR_CAST (G_OBJECT_CLASS (parent_class)->constructor (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); + + target = gst_validate_monitor_get_target (monitor); + g_object_set_data ((GObject *) target, "validate-monitor", monitor); + gst_object_unref (target); + return (GObject *) monitor; }