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>
This commit is contained in:
parent
363050f44c
commit
7ff988275f
2
NEWS
2
NEWS
@ -2,6 +2,8 @@ ver 0.17.5 (not yet released)
|
|||||||
* protocol:
|
* protocol:
|
||||||
- fix "playlistadd" with URI
|
- fix "playlistadd" with URI
|
||||||
- fix "move" relative to current when there is no current song
|
- fix "move" relative to current when there is no current song
|
||||||
|
* decoder:
|
||||||
|
- mikmod: adapt to libmikmod 3.2
|
||||||
* configure.ac:
|
* configure.ac:
|
||||||
- detect system "ar"
|
- detect system "ar"
|
||||||
|
|
||||||
|
@ -200,7 +200,11 @@ mikmod_decoder_scan_file(const char *path_fs,
|
|||||||
if (title != NULL) {
|
if (title != NULL) {
|
||||||
tag_handler_invoke_tag(handler, handler_ctx,
|
tag_handler_invoke_tag(handler, handler_ctx,
|
||||||
TAG_TITLE, title);
|
TAG_TITLE, title);
|
||||||
|
#if (LIBMIKMOD_VERSION >= 0x030200)
|
||||||
|
MikMod_free(title);
|
||||||
|
#else
|
||||||
free(title);
|
free(title);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user