gnlobject: Allow commiting of object that are not inside a composition
authorThibault Saunier <tsaunier@gnome.org>
Thu, 3 Jul 2014 12:32:44 +0000 (14:32 +0200)
committerThibault Saunier <tsaunier@gnome.org>
Fri, 31 Oct 2014 10:58:08 +0000 (11:58 +0100)
Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>

gnl/gnlobject.c

index 306f8f1..d3fa85d 100644 (file)
@@ -49,18 +49,12 @@ static GObjectClass *parent_class = NULL;
  ****************************************************/
 #define CHECK_AND_SET(PROPERTY, property, prop_str, print_format)            \
 {                                                                            \
-GstObject *parent = gst_object_get_parent (GST_OBJECT (object));             \
-if (parent == NULL && !GNL_OBJECT_IS_COMPOSITION (object)) {                 \
-  GST_INFO_OBJECT (object, "Not in a composition yet, "                      \
-      "not commiting" prop_str);                                             \
-} else if (object->pending_##property != object->property)      {            \
+if (object->pending_##property != object->property)      {            \
   object->property = object->pending_##property;                             \
   GST_DEBUG_OBJECT(object, "Setting " prop_str " to %"                       \
       print_format, object->property);                                       \
 } else                                                                       \
   GST_DEBUG_OBJECT(object, "Nothing to do for " prop_str);                   \
-if (parent)                                                                  \
-  gst_object_unref (parent);                                                 \
 }
 
 #define SET_PENDING_VALUE(property, property_str, type, print_format)      \