From 2238f0536fa7bb4ad6d59ff38ed040dc4d81ff64 Mon Sep 17 00:00:00 2001 From: Ewald Snel Date: Tue, 23 Apr 2002 13:30:42 +0000 Subject: 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 --- src/libmpeg2/xine_decoder.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/libmpeg2/xine_decoder.c') diff --git a/src/libmpeg2/xine_decoder.c b/src/libmpeg2/xine_decoder.c index 3543ce6e2..2525b888e 100644 --- a/src/libmpeg2/xine_decoder.c +++ b/src/libmpeg2/xine_decoder.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: xine_decoder.c,v 1.27 2002/04/09 03:38:00 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.28 2002/04/23 13:30:43 esnel Exp $ * * stuff needed to turn libmpeg2 into a xine decoder plugin */ @@ -141,6 +141,10 @@ static char *mpeg2dec_get_id(void) { return "mpeg2dec"; } +static void mpeg2dec_dispose (video_decoder_t *this_gen) { + free (this_gen); +} + video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) { mpeg2dec_decoder_t *this ; @@ -164,6 +168,7 @@ video_decoder_t *init_video_decoder_plugin (int iface_version, xine_t *xine) { this->video_decoder.reset = mpeg2dec_reset; this->video_decoder.close = mpeg2dec_close; this->video_decoder.get_identifier = mpeg2dec_get_id; + this->video_decoder.dispose = mpeg2dec_dispose; this->video_decoder.priority = 5; this->mpeg2.xine = xine; -- cgit v1.2.3