tsdemux: Fix leak of PCROffsetGroup

https://bugzilla.gnome.org/show_bug.cgi?id=722462
This commit is contained in:
Andrey Utkin 2014-01-18 01:19:36 +02:00 committed by Thiago Santos
parent dfd23a3182
commit 0caa4cdfd8

View file

@ -94,12 +94,21 @@ get_pcr_table (MpegTSPacketizer2 * packetizer, guint16 pid)
return res;
}
static void
pcr_offset_group_free (PCROffsetGroup * group)
{
g_free (group->values);
g_slice_free (PCROffsetGroup, group);
}
static void
flush_observations (MpegTSPacketizer2 * packetizer)
{
gint i;
for (i = 0; i < packetizer->lastobsid; i++) {
g_list_free_full (packetizer->observations[i]->groups,
(GDestroyNotify) pcr_offset_group_free);
if (packetizer->observations[i]->current)
g_slice_free (PCROffsetCurrent, packetizer->observations[i]->current);
g_free (packetizer->observations[i]);