From b0f5163aa664dfd6329f862f4bcb921154a23296 Mon Sep 17 00:00:00 2001 From: James Courtier-Dutton Date: Sun, 15 Sep 2002 12:28:16 +0000 Subject: More mem leak patches from ewald@rambo.its.tudelft.nl CVS patchset: 2667 CVS date: 2002/09/15 12:28:16 --- src/xine-engine/load_plugins.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index 993328f37..ed6eb4f85 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: load_plugins.c,v 1.91 2002/09/11 17:41:08 guenter Exp $ + * $Id: load_plugins.c,v 1.92 2002/09/15 12:28:16 jcdutton Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -920,14 +920,29 @@ spu_decoder_t *get_spu_decoder (xine_t *this, uint8_t stream_type) { void dispose_plugins (xine_t *this) { /* FIXME: adapt old code */ - -#if 0 - for (i = 0; i < this->num_demuxer_plugins; i++) - this->demuxer_plugins[i]->close (this->demuxer_plugins[i]); + plugin_node_t *node; - for (i = 0; i < this->num_input_plugins; i++) - this->input_plugins[i]->dispose (this->input_plugins[i]); + node = xine_list_first_content (this->plugin_catalog->demux); + while (node) { + demux_plugin_t *dp = node->plugin; + + if (dp) + dp->close (dp); + + node = xine_list_next_content (this->plugin_catalog->demux); + } + node = xine_list_first_content (this->plugin_catalog->input); + while (node) { + input_plugin_t *ip = node->plugin; + + if (ip) + ip->dispose (ip); + + node = xine_list_next_content (this->plugin_catalog->input); + } + +#if 0 for (i = 0; i < this->num_audio_decoders_loaded; i++) this->audio_decoders_loaded[i]->dispose (this->audio_decoders_loaded[i]); -- cgit v1.2.3