From 7ff988275f9c3487d54c23d55218301aa0111aff Mon Sep 17 00:00:00 2001 From: Christoph Mende Date: Sat, 20 Apr 2013 08:29:11 +0200 Subject: 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 --- src/decoder/mikmod_decoder_plugin.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/decoder/mikmod_decoder_plugin.c') 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; -- cgit v1.2.3