Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 169569 - media-sound/mpd loops forever when playing certain .MOD files
Summary: media-sound/mpd loops forever when playing certain .MOD files
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Andrej Kacian (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-06 04:55 UTC by Max Arnold
Modified: 2007-03-06 15:54 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Max Arnold 2007-03-06 04:55:44 UTC
- bugreport copied from http://www.musicpd.org/mantis/view.php?id=1392 -

Certain .MOD files have commands to jump backwords in the module to create an infinite loop. MPD should (IMO) ignore that and just play the module once. The fix is simple, just instruct libmikmod to ignore those loops:

--- mod_plugin.c.orig 2006-11-12 19:32:57.780498463 -0700
+++ mod_plugin.c 2006-11-12 19:54:02.585735147 -0700
@@ -143,6 +143,9 @@
        if (!(moduleHandle = Player_Load(path, 128, 0)))
                return NULL;
 
+ /* Prevent module from looping forever */
+ moduleHandle->loop = 0;
+
        data = xmalloc(sizeof(mod_Data));
 
        data->audio_buffer = xmalloc(MIKMOD_FRAME_SIZE);


Someone please include this patch in portage (I've tested it with mpd-0.12.1, works fine).

Reproducible: Always
Comment 1 Andrej Kacian (RETIRED) gentoo-dev 2007-03-06 15:54:56 UTC
Sorry, I'm not going to include a patch that hasn't been approved upstream. I started watching the bugreport in upstream tracker, and as soon as it's in (in some form), I will add the patch for 0.12.1 until a new release is out.

Thanks for reporting, both here and upstream, though!