ttmlparse: Don't leak TtmlElements when deleting GNodes/trees.

https://bugzilla.gnome.org/show_bug.cgi?id=781725
This commit is contained in:
Chris Bass 2017-04-25 10:04:50 +01:00 committed by Sebastian Dröge
parent 29feef4913
commit d8afce67c3

View file

@ -1152,7 +1152,7 @@ ttml_remove_nodes_by_time (GNode * node, GstClockTime time)
}
if (!node->children && ((element->begin > time) || (element->end <= time))) {
g_node_destroy (node);
ttml_delete_tree (node);
node = NULL;
}
@ -1704,7 +1704,7 @@ static void
ttml_delete_scene (TtmlScene * scene)
{
if (scene->trees)
g_list_free_full (scene->trees, (GDestroyNotify) g_node_destroy);
g_list_free_full (scene->trees, (GDestroyNotify) ttml_delete_tree);
if (scene->buf)
gst_buffer_unref (scene->buf);
g_slice_free (TtmlScene, scene);