container: fix child duration callback
authorHenry Wilkes <hwilkes@igalia.com>
Mon, 24 Feb 2020 20:19:12 +0000 (20:19 +0000)
committerThibault Saunier <tsaunier@igalia.com>
Thu, 5 Mar 2020 20:04:51 +0000 (17:04 -0300)
Previously, we were setting the inpoint_offset using the start offset in
the duration callback!

Also added a notify for when the duration is changed in the child start
callback.

ges/ges-container.c

index 1ddb6f4..cee3a11 100644 (file)
@@ -567,6 +567,7 @@ _child_start_changed_cb (GESTimelineElement * child,
             GES_ARGS (container));
 
         g_object_notify (G_OBJECT (container), "start");
+        g_object_notify (G_OBJECT (container), "duration");
       }
 
       /* Falltrough! */
@@ -652,7 +653,7 @@ _child_duration_changed_cb (GESTimelineElement * child,
       }
       /* Falltrough */
     case GES_CHILDREN_UPDATE_OFFSETS:
-      map->inpoint_offset = _START (container) - _START (child);
+      map->duration_offset = _DURATION (container) - _DURATION (child);
       break;
     case GES_CHILDREN_UPDATE:
       /* We update all the children calling our set_duration method */