summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Mende <mende.christoph@gmail.com>2013-04-20 08:29:11 +0200
committerMax Kellermann <max@duempel.org>2013-08-01 09:30:20 +0200
commit7ff988275f9c3487d54c23d55218301aa0111aff (patch)
treef864865400638a590aab3bed9a9f592609f4caa7
parent363050f44c9aa75b93a2402f0df2f1c5e97c35e9 (diff)
decoder/mikmod: use MikMod_free() to free the title on libmikmod-3.2
Player_LoadTitle() returns an aligned pointer in libmikmod-3.2 that cannot be freed with free(). The correct way to do this now is MikMod_free() which extracts the original pointer from the buffer and frees that. Signed-off-by: Christoph Mende <mende.christoph@gmail.com>
-rw-r--r--NEWS2
-rw-r--r--src/decoder/mikmod_decoder_plugin.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index b302870dc..6547bde82 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,8 @@ ver 0.17.5 (not yet released)
* protocol:
- fix "playlistadd" with URI
- fix "move" relative to current when there is no current song
+* decoder:
+ - mikmod: adapt to libmikmod 3.2
* configure.ac:
- detect system "ar"
diff --git a/src/decoder/mikmod_decoder_plugin.c b/src/decoder/mikmod_decoder_plugin.c
index 5681a7a57..a8fe818de 100644
--- a/src/decoder/mikmod_decoder_plugin.c
+++ b/src/decoder/mikmod_decoder_plugin.c
@@ -200,7 +200,11 @@ mikmod_decoder_scan_file(const char *path_fs,
if (title != NULL) {
tag_handler_invoke_tag(handler, handler_ctx,
TAG_TITLE, title);
+#if (LIBMIKMOD_VERSION >= 0x030200)
+ MikMod_free(title);
+#else
free(title);
+#endif
}
return true;