diff options
Diffstat (limited to 'gst/dvbsuboverlay')
-rw-r--r-- | gst/dvbsuboverlay/dvb-sub.c | 5 | ||||
-rw-r--r-- | gst/dvbsuboverlay/gstdvbsuboverlay.c | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gst/dvbsuboverlay/dvb-sub.c b/gst/dvbsuboverlay/dvb-sub.c index eb6810658..435de92a8 100644 --- a/gst/dvbsuboverlay/dvb-sub.c +++ b/gst/dvbsuboverlay/dvb-sub.c @@ -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); } diff --git a/gst/dvbsuboverlay/gstdvbsuboverlay.c b/gst/dvbsuboverlay/gstdvbsuboverlay.c index ca6789a87..dc2b2d473 100644 --- a/gst/dvbsuboverlay/gstdvbsuboverlay.c +++ b/gst/dvbsuboverlay/gstdvbsuboverlay.c @@ -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); |