nle: Delay marking object as not in composition
authorThibault Saunier <tsaunier@igalia.com>
Wed, 11 Mar 2020 22:38:19 +0000 (19:38 -0300)
committerThibault Saunier <tsaunier@igalia.com>
Wed, 11 Mar 2020 22:44:52 +0000 (22:44 +0000)
Instead of doing it at the time of resetting `object->in_composition`
when user calls `gst_bin_remove` do it after we actually removed
it from the object thread, and do it in the `nle_object_reset`
method where it belongs

Fixes https://gitlab.freedesktop.org/gstreamer/gst-editing-services/issues/96

plugins/nle/nlecomposition.c
plugins/nle/nleobject.c

index d0f838f305b908e752c4dc4d816bf6c0226cc2c5..3e7b079b6705424f6039f8278e08d88368031b85 100644 (file)
@@ -3543,7 +3543,6 @@ nle_composition_remove_object (GstBin * bin, GstElement * element)
 
   object = NLE_OBJECT (element);
 
-  object->in_composition = FALSE;
   _add_remove_object_action (comp, object);
 
   return TRUE;
index 8e166405ff1f62a79981db53bfa5c454c3796bc3..6e16f8e032eeb9e6292ff3a0ba649c0516e3ec96 100644 (file)
@@ -738,6 +738,7 @@ nle_object_reset (NleObject * object)
   object->inpoint = GST_CLOCK_TIME_NONE;
   object->priority = 0;
   object->active = TRUE;
+  object->in_composition = FALSE;
 }
 
 GType