summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2010-07-18 23:48:13 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2010-07-18 23:48:13 +0100
commit0a248642d1d8f9908ce90bed2558eec3410b64ad (patch)
treeb9b1760d0b1bcd8efd46f7b28ddaf5695d11f199 /src
parent33fc4bc00ae12749ff588ad438a5490d5edb4172 (diff)
downloadxine-lib-0a248642d1d8f9908ce90bed2558eec3410b64ad.tar.gz
xine-lib-0a248642d1d8f9908ce90bed2558eec3410b64ad.tar.bz2
Fix playback of the first file handled by the modplug demuxer.
Diffstat (limited to 'src')
-rw-r--r--src/demuxers/demux_mod.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/demuxers/demux_mod.c b/src/demuxers/demux_mod.c
index 55eca30c3..2749eb048 100644
--- a/src/demuxers/demux_mod.c
+++ b/src/demuxers/demux_mod.c
@@ -166,13 +166,6 @@ static int open_mod_file(demux_mod_t *this) {
return 0;
}
- this->mpfile = ModPlug_Load(this->buffer, this->filesize);
- if (this->mpfile==NULL) {
- xine_log(this->stream->xine, XINE_LOG_PLUGIN, "modplug - load error\n");
- free(this->buffer);
- return 0;
- }
-
/* Set up modplug engine */
ModPlug_GetSettings(&this->settings);
this->settings.mResamplingMode = MODPLUG_RESAMPLE_FIR; /* RESAMP */
@@ -181,6 +174,13 @@ static int open_mod_file(demux_mod_t *this) {
this->settings.mFrequency = MOD_SAMPLERATE;
ModPlug_SetSettings(&this->settings);
+ this->mpfile = ModPlug_Load(this->buffer, this->filesize);
+ if (this->mpfile==NULL) {
+ xine_log(this->stream->xine, XINE_LOG_PLUGIN, "modplug - load error\n");
+ free(this->buffer);
+ return 0;
+ }
+
this->title = strdup(ModPlug_GetName(this->mpfile));
this->artist = strdup("");
this->copyright = strdup("");