mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
dvbsuboverlay: fix two minor deinitialization memory leaks
This commit is contained in:
parent
3bb1d2937f
commit
9f02f693de
2 changed files with 13 additions and 0 deletions
|
@ -1352,6 +1352,11 @@ dvb_sub_free (DvbSub * sub)
|
|||
/* TODO: Add deinitalization code here */
|
||||
/* FIXME: Clear up region_list contents */
|
||||
delete_state (sub);
|
||||
while (sub->display_list) {
|
||||
DVBSubRegionDisplay *tmp = sub->display_list->next;
|
||||
g_slice_free (DVBSubRegionDisplay, sub->display_list);
|
||||
sub->display_list = tmp;
|
||||
}
|
||||
g_string_free (sub->pes_buffer, TRUE);
|
||||
g_slice_free (DvbSub, sub);
|
||||
}
|
||||
|
|
|
@ -167,6 +167,10 @@ gst_dvbsub_overlay_flush_subtitles (GstDVBSubOverlay * render)
|
|||
dvb_subtitles_free (subs);
|
||||
}
|
||||
|
||||
if (render->current_subtitle)
|
||||
dvb_subtitles_free (render->current_subtitle);
|
||||
render->current_subtitle = NULL;
|
||||
|
||||
if (render->dvb_sub)
|
||||
dvb_sub_free (render->dvb_sub);
|
||||
|
||||
|
@ -251,6 +255,10 @@ gst_dvbsub_overlay_finalize (GObject * object)
|
|||
}
|
||||
g_queue_free (overlay->pending_subtitles);
|
||||
|
||||
if (overlay->current_subtitle)
|
||||
dvb_subtitles_free (overlay->current_subtitle);
|
||||
overlay->current_subtitle = NULL;
|
||||
|
||||
if (overlay->dvb_sub)
|
||||
dvb_sub_free (overlay->dvb_sub);
|
||||
|
||||
|
|
Loading…
Reference in a new issue