From 0a248642d1d8f9908ce90bed2558eec3410b64ad Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sun, 18 Jul 2010 23:48:13 +0100 Subject: Fix playback of the first file handled by the modplug demuxer. --- src/demuxers/demux_mod.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/demuxers/demux_mod.c') 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(""); -- cgit v1.2.3