summaryrefslogtreecommitdiff
path: root/src/libspudec/xine_decoder.c
diff options
context:
space:
mode:
authorEwald Snel <esnel@users.sourceforge.net>2002-04-23 13:30:42 +0000
committerEwald Snel <esnel@users.sourceforge.net>2002-04-23 13:30:42 +0000
commit2238f0536fa7bb4ad6d59ff38ed040dc4d81ff64 (patch)
tree41c61dbec58d9c610019cf4dade18416c6076d91 /src/libspudec/xine_decoder.c
parent8cab88a56f0c9fcaa14ea197ad8a95c58024abfc (diff)
downloadxine-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/libspudec/xine_decoder.c')
-rw-r--r--src/libspudec/xine_decoder.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/libspudec/xine_decoder.c b/src/libspudec/xine_decoder.c
index 0b2b437ec..7f937d4d9 100644
--- a/src/libspudec/xine_decoder.c
+++ b/src/libspudec/xine_decoder.c
@@ -19,7 +19,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.60 2002/04/09 13:53:52 miguelfreitas Exp $
+ * $Id: xine_decoder.c,v 1.61 2002/04/23 13:30:44 esnel Exp $
*
* stuff needed to turn libspu into a xine decoder plugin
*/
@@ -267,6 +267,15 @@ static char *spudec_get_id(void) {
return "spudec";
}
+static void spudec_dispose (spu_decoder_t *this_gen) {
+ spudec_decoder_t *this = (spudec_decoder_t *) this_gen;
+
+ xine_remove_event_listener (this->xine, spudec_event_listener);
+
+ free (this->event.object.overlay);
+ free (this);
+}
+
spu_decoder_t *init_spu_decoder_plugin (int iface_version, xine_t *xine) {
spudec_decoder_t *this ;
@@ -289,6 +298,7 @@ spu_decoder_t *init_spu_decoder_plugin (int iface_version, xine_t *xine) {
this->spu_decoder.reset = spudec_reset;
this->spu_decoder.close = spudec_close;
this->spu_decoder.get_identifier = spudec_get_id;
+ this->spu_decoder.dispose = spudec_dispose;
this->spu_decoder.priority = 1;
this->xine = xine;