We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3907

Summary: [PATCH] make sure libmpg123 is recent enough
Product: SDL_mixer Reporter: Ozkan Sezer <sezeroz>
Component: miscAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: unspecified   
Hardware: x86   
OS: Linux   

Description Ozkan Sezer 2017-10-22 09:05:48 UTC
The attached patch makes sure that we are building against
a recent-enough libmpg123:  mpg123_replace_reader_handle()
requires MPG123_API_VERSION >= 24.

diff --git a/music_mpg123.c b/music_mpg123.c
--- a/music_mpg123.c
+++ b/music_mpg123.c
@@ -32,6 +32,11 @@
 
 #include <mpg123.h>
 
+/* MPG123_API_VERSION >= 24 needed for mpg123_replace_reader_handle() */
+#if !defined(MPG123_API_VERSION) || (MPG123_API_VERSION-0 < 24)
+#error minimum required libmpg123 version is 1.12.0 (api version 24)
+#endif
+
 
 typedef struct {
     int loaded;
Comment 1 Sam Lantinga 2017-10-22 17:49:36 UTC
We actually want to catch this during configure rather than as an error at build time.

I've implemented that here:
https://hg.libsdl.org/SDL_mixer/rev/ab82b7aff1fd

Thanks!