aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMatthias Drochner <M.Drochner@fz-juelich.de>2009-01-28 19:13:44 +0100
committerMax Kellermann <max@duempel.org>2009-01-30 17:50:33 +0100
commit38fa9124e8c5b02dbc7d9673a04eb3d5f5852033 (patch)
treebdfb125b0a0f4cdfd52ad3f6db64fa89c6fe995a /src/decoder
parentb78daa5a87501e6a38d5ae06b5f9dedd0550b80e (diff)
downloadmpd-38fa9124e8c5b02dbc7d9673a04eb3d5f5852033.tar.gz
mpd-38fa9124e8c5b02dbc7d9673a04eb3d5f5852033.tar.xz
mpd-38fa9124e8c5b02dbc7d9673a04eb3d5f5852033.zip
mikmod: call MikMod_Exit() only in the finish() method
Hi - independently of libmikmod's other problems - there seems to be a problem in mpd's wrapper: MikMod_Exit() is called after the first file is decoded, which frees some ressources within the mikmod library. An attempt to play a second file leads to a crash. The appended patch fixes this for me. (I don't know what the "dup" entry is good for - someone who knows should review that too.) best regards Matthias [mk: removed 3 more MikMod_Exit() invocations]
Diffstat (limited to 'src/decoder')
-rw-r--r--src/decoder/mod_plugin.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/decoder/mod_plugin.c b/src/decoder/mod_plugin.c
index a391b2c77..a95f5345c 100644
--- a/src/decoder/mod_plugin.c
+++ b/src/decoder/mod_plugin.c
@@ -172,7 +172,6 @@ mod_decode(struct decoder *decoder, const char *path)
if (!(data = mod_open(path))) {
ERROR("failed to open mod: %s\n", path);
- MikMod_Exit();
return;
}
@@ -195,8 +194,6 @@ mod_decode(struct decoder *decoder, const char *path)
}
mod_close(data);
-
- MikMod_Exit();
}
static struct tag *modTagDup(const char *file)
@@ -212,7 +209,6 @@ static struct tag *modTagDup(const char *file)
if (moduleHandle == NULL) {
DEBUG("modTagDup: Failed to open file: %s\n", file);
- MikMod_Exit();
return NULL;
}
@@ -228,8 +224,6 @@ static struct tag *modTagDup(const char *file)
if (title)
tag_add_item(ret, TAG_ITEM_TITLE, title);
- MikMod_Exit();
-
return ret;
}