nlecomposition: Don't leak GNode
authorSeungha Yang <seungha.yang@navercorp.com>
Mon, 14 Jan 2019 03:52:47 +0000 (12:52 +0900)
committerThibault Saunier <tsaunier@gnome.org>
Fri, 18 Jan 2019 20:32:02 +0000 (20:32 +0000)
Clear the last node before update

plugins/nle/nlecomposition.c

index 755c61ddf647d56c0a7d9bb6843e3d63f4eac939..9625bb342c00d17f1407326bc242175a199252a2 100644 (file)
@@ -3097,6 +3097,10 @@ update_pipeline (NleComposition * comp, GstClockTime currenttime, gint32 seqnum,
   GST_INFO_OBJECT (comp, "Setting current stack [%" GST_TIME_FORMAT " - %"
       GST_TIME_FORMAT "]", GST_TIME_ARGS (priv->current_stack_start),
       GST_TIME_ARGS (priv->current_stack_stop));
+
+  if (priv->current)
+    g_node_destroy (priv->current);
+
   priv->current = stack;
 
   if (priv->current) {