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. --- ChangeLog | 1 + src/demuxers/demux_mod.c | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1689d9d33..1fd25f24a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,7 @@ xine-lib (1.1.19) 2010-??-?? * Recognise and handle the WebM container format. (VP8 video is not yet supported.) * Recognise ScreamTracker 2 & 3 files. (ST3 untested.) + * Fix playback of the first file handled by the modplug demuxer. xine-lib (1.1.18.1) 2010-03-06 * Oops. compat.c (for DXR3 support) was omitted. 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