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 4056

Summary: MP3 playback via SMPEG doesn't compile; crashes
Product: SDL_mixer Reporter: Ralph Versteegen <teeemcee>
Component: miscAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED ABANDONED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: admin, sezeroz
Version: 2.0.2   
Hardware: All   
OS: All   

Description Ralph Versteegen 2018-01-20 11:41:04 UTC
The smpeg interface (--enable-music-mp3 --enable-music-mp3-smpeg) no longer compiles, since the recent refactoring. Here's a fix for that:

--- a/music_smpeg.c     Tue Dec 12 22:32:02 2017 -0800
+++ b/music_smpeg.c     Sat Jan 20 18:28:23 2018 +1300
@@ -138,7 +138,7 @@
         SDL_free(music);
         return NULL;
     }
-    smpeg.SMPEG_actualSpec(mp3, &music_spec);
+    smpeg.SMPEG_actualSpec(music->mp3, &music_spec);
 
     music->freesrc = freesrc;
     return music;
@@ -172,7 +172,7 @@
     Uint8 *stream = (Uint8 *)data;
     int len = bytes;
     int left = (len - smpeg.SMPEG_playAudio(music->mp3, stream, len));
-    if (left > 0) {
+    if (left > 0)
         stream += (len - left);
     return left;
 }

However, with this patch applied it compiles but immediately crashes when attempting to play any mp3 file (tested only on 32 bit Windows).

Also, note the suspicious lines above
     if (left > 0) {
         stream += (len - left);
which were added in r798 but do nothing.

Even wit
Comment 1 Vitaly Novichkov 2019-02-01 15:38:06 UTC
I think, it's no more actual since SMPEG support has been completely removed recently. So, SDL Mixer now supports libMAD and MPG123 libraries only for MP3 playback.
Comment 2 Ozkan Sezer 2019-02-02 16:55:18 UTC
Build was fixed by https://hg.libsdl.org/SDL_mixer/rev/b56dbe75cac8
then the smpeg support was removed completely. Closing as abandoned.