diff options
author | Ewald Snel <esnel@users.sourceforge.net> | 2002-04-23 13:30:42 +0000 |
---|---|---|
committer | Ewald Snel <esnel@users.sourceforge.net> | 2002-04-23 13:30:42 +0000 |
commit | 2238f0536fa7bb4ad6d59ff38ed040dc4d81ff64 (patch) | |
tree | 41c61dbec58d9c610019cf4dade18416c6076d91 /src/demuxers | |
parent | 8cab88a56f0c9fcaa14ea197ad8a95c58024abfc (diff) | |
download | xine-lib-2238f0536fa7bb4ad6d59ff38ed040dc4d81ff64.tar.gz xine-lib-2238f0536fa7bb4ad6d59ff38ed040dc4d81ff64.tar.bz2 |
Fix memory leaks by disposing input, demux and decoder plugins at exit
- add dispose() function to all decoder plugin structures
CVS patchset: 1763
CVS date: 2002/04/23 13:30:42
Diffstat (limited to 'src/demuxers')
-rw-r--r-- | src/demuxers/demux_avi.c | 7 | ||||
-rw-r--r-- | src/demuxers/demux_cda.c | 4 | ||||
-rw-r--r-- | src/demuxers/demux_elem.c | 4 | ||||
-rw-r--r-- | src/demuxers/demux_mpeg.c | 4 | ||||
-rw-r--r-- | src/demuxers/demux_mpeg_block.c | 3 | ||||
-rw-r--r-- | src/demuxers/demux_mpgaudio.c | 4 | ||||
-rw-r--r-- | src/demuxers/demux_pes.c | 4 | ||||
-rw-r--r-- | src/demuxers/demux_ts.c | 5 |
8 files changed, 20 insertions, 15 deletions
diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c index b768a6dc9..53a4a8cdc 100644 --- a/src/demuxers/demux_avi.c +++ b/src/demuxers/demux_avi.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: demux_avi.c,v 1.79 2002/04/23 00:55:46 miguelfreitas Exp $ + * $Id: demux_avi.c,v 1.80 2002/04/23 13:30:42 esnel Exp $ * * demultiplexer for avi streams * @@ -228,6 +228,7 @@ static void AVI_close(avi_t *AVI) #define ERR_EXIT(x) \ do { \ this->AVI_errno = x; \ + free (AVI); \ return 0; \ } while(0) @@ -974,6 +975,10 @@ static void demux_avi_stop (demux_plugin_t *this_gen) { static void demux_avi_close (demux_plugin_t *this_gen) { demux_avi_t *this = (demux_avi_t *) this_gen; + + if (this->avi) + AVI_close (this->avi); + free(this); } diff --git a/src/demuxers/demux_cda.c b/src/demuxers/demux_cda.c index e7a5731a8..9b5c5eb50 100644 --- a/src/demuxers/demux_cda.c +++ b/src/demuxers/demux_cda.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: demux_cda.c,v 1.11 2002/04/09 03:38:00 miguelfreitas Exp $ + * $Id: demux_cda.c,v 1.12 2002/04/23 13:30:42 esnel Exp $ */ #ifdef HAVE_CONFIG_H @@ -289,7 +289,7 @@ static char *demux_cda_get_mimetypes(void) { * */ static void demux_cda_close (demux_plugin_t *this) { - + free (this); } /* diff --git a/src/demuxers/demux_elem.c b/src/demuxers/demux_elem.c index f5fc4c625..ab27c49a9 100644 --- a/src/demuxers/demux_elem.c +++ b/src/demuxers/demux_elem.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: demux_elem.c,v 1.38 2002/04/11 22:27:11 jcdutton Exp $ + * $Id: demux_elem.c,v 1.39 2002/04/23 13:30:42 esnel Exp $ * * demultiplexer for elementary mpeg streams * @@ -360,7 +360,7 @@ static char *demux_mpeg_elem_get_mimetypes(void) { } static void demux_mpeg_elem_close (demux_plugin_t *this) { - /* nothing */ + free (this); } static int demux_mpeg_elem_get_stream_length(demux_plugin_t *this_gen) { diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c index 1f711a336..e78e1633f 100644 --- a/src/demuxers/demux_mpeg.c +++ b/src/demuxers/demux_mpeg.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: demux_mpeg.c,v 1.55 2002/04/19 03:05:07 miguelfreitas Exp $ + * $Id: demux_mpeg.c,v 1.56 2002/04/23 13:30:42 esnel Exp $ * * demultiplexer for mpeg 1/2 program streams * reads streams of variable blocksizes @@ -971,7 +971,7 @@ static char *demux_mpeg_get_mimetypes(void) { } static void demux_mpeg_close (demux_plugin_t *this) { - /* nothing */ + free (this); } static int demux_mpeg_get_stream_length (demux_plugin_t *this_gen) { diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c index 730a9e435..30cba9fd8 100644 --- a/src/demuxers/demux_mpeg_block.c +++ b/src/demuxers/demux_mpeg_block.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: demux_mpeg_block.c,v 1.93 2002/04/22 01:08:34 f1rmb Exp $ + * $Id: demux_mpeg_block.c,v 1.94 2002/04/23 13:30:42 esnel Exp $ * * demultiplexer for mpeg 1/2 program streams * @@ -818,6 +818,7 @@ static int demux_mpeg_block_estimate_rate (demux_mpeg_block_t *this) { static void demux_mpeg_block_close (demux_plugin_t *this_gen) { demux_mpeg_block_t *this = (demux_mpeg_block_t *) this_gen; + free (this->scratch_base); free (this); } diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c index b76ffc48e..6e8556820 100644 --- a/src/demuxers/demux_mpgaudio.c +++ b/src/demuxers/demux_mpgaudio.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: demux_mpgaudio.c,v 1.38 2002/04/09 03:38:00 miguelfreitas Exp $ + * $Id: demux_mpgaudio.c,v 1.39 2002/04/23 13:30:42 esnel Exp $ * * demultiplexer for mpeg audio (i.e. mp3) streams * @@ -455,7 +455,7 @@ static char *demux_mpgaudio_get_mimetypes(void) { } static void demux_mpgaudio_close (demux_plugin_t *this) { - /* nothing */ + free (this); } static int demux_mpgaudio_get_stream_length (demux_plugin_t *this_gen) { diff --git a/src/demuxers/demux_pes.c b/src/demuxers/demux_pes.c index 99630901a..1d5a3f58f 100644 --- a/src/demuxers/demux_pes.c +++ b/src/demuxers/demux_pes.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: demux_pes.c,v 1.24 2002/04/11 22:27:11 jcdutton Exp $ + * $Id: demux_pes.c,v 1.25 2002/04/23 13:30:42 esnel Exp $ * * demultiplexer for mpeg 2 PES (Packetized Elementary Streams) * reads streams of variable blocksizes @@ -615,7 +615,7 @@ static char *demux_pes_get_mimetypes(void) { } static void demux_pes_close (demux_plugin_t *this) { - /* nothing */ + free (this); } static int demux_pes_get_stream_length (demux_plugin_t *this_gen) { diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c index 9352c0724..f52d475e7 100644 --- a/src/demuxers/demux_ts.c +++ b/src/demuxers/demux_ts.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: demux_ts.c,v 1.41 2002/04/09 03:38:00 miguelfreitas Exp $ + * $Id: demux_ts.c,v 1.42 2002/04/23 13:30:42 esnel Exp $ * * Demultiplexer for MPEG2 Transport Streams. * @@ -1228,8 +1228,7 @@ static void *demux_ts_loop(void *gen_this) { } static void demux_ts_close(demux_plugin_t *gen_this) { - - /* nothing */ + free (gen_this); } static char *demux_ts_get_id(void) { |