ges: Fix ges_layer_get_clips_in_interval(start, end) refcount handling
authorHarish Fulara <harish14143@iiitd.ac.in>
Tue, 27 Feb 2018 09:56:29 +0000 (15:26 +0530)
committerThibault Saunier <tsaunier@igalia.com>
Tue, 27 Feb 2018 12:56:43 +0000 (09:56 -0300)
The documentation states that it returns a (transfer full) list
of GESClip but it was returning a (transfer container) list. Make
sure to actually make it (transfer full).

https://bugzilla.gnome.org/show_bug.cgi?id=793874

ges/ges-layer.c

index 9863ce6..7809065 100644 (file)
@@ -777,8 +777,8 @@ ges_layer_get_clips_in_interval (GESLayer * layer, GstClockTime start,
 
     if (clip_intersects)
       intersecting_clips =
-          g_list_insert_sorted (intersecting_clips, tmp->data,
-          (GCompareFunc) element_start_compare);
+          g_list_insert_sorted (intersecting_clips,
+          gst_object_ref (tmp->data), (GCompareFunc) element_start_compare);
   }
   return intersecting_clips;
 }