diff options
| author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2010-07-19 14:58:01 +0100 |
|---|---|---|
| committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2010-07-19 14:58:01 +0100 |
| commit | 9a1825f0c38bab7e3831da512db11e96ff2214d2 (patch) | |
| tree | 1b508c776d2a7fa92b9ad1236ad65dbd230de757 /src/demuxers | |
| parent | 99fac65726da3158cfcbe2323fc15bca28d304df (diff) | |
| parent | f5c747a4d6c1d01a5c15c5b5837a19ca0b4c8f1c (diff) | |
| download | xine-lib-9a1825f0c38bab7e3831da512db11e96ff2214d2.tar.gz xine-lib-9a1825f0c38bab7e3831da512db11e96ff2214d2.tar.bz2 | |
Merge from 1.1.
Diffstat (limited to 'src/demuxers')
| -rw-r--r-- | src/demuxers/demux_ac3.c | 2 | ||||
| -rw-r--r-- | src/demuxers/demux_mod.c | 22 |
2 files changed, 16 insertions, 8 deletions
diff --git a/src/demuxers/demux_ac3.c b/src/demuxers/demux_ac3.c index 105603293..d42396f90 100644 --- a/src/demuxers/demux_ac3.c +++ b/src/demuxers/demux_ac3.c @@ -453,7 +453,7 @@ void *demux_ac3_init_plugin (xine_t *xine, void *data) { this->demux_class.open_plugin = open_plugin; this->demux_class.description = N_("Raw AC3 demux plugin"); this->demux_class.identifier = "AC3"; - this->demux_class.mimetypes = NULL; + this->demux_class.mimetypes = "audio/ac3: ac3: Dolby Digital audio;"; this->demux_class.extensions = "ac3"; this->demux_class.dispose = default_demux_class_dispose; diff --git a/src/demuxers/demux_mod.c b/src/demuxers/demux_mod.c index 7e717fc61..4de5ca7d8 100644 --- a/src/demuxers/demux_mod.c +++ b/src/demuxers/demux_mod.c @@ -121,6 +121,14 @@ static int probe_mod_file(demux_mod_t *this) { return 1; } + /* ScreamTracker 2 */ + if (!memcmp (header.buffer + 20, "!Scream!", 7)) + return 1; + + /* ScreamTracker 3 */ + if (_X_ABE_32(header.values + 0x2C / sizeof (uint32_t)) == FOURCC_32('S', 'C', 'R', 'M')) + return 1; + return 0; } @@ -155,13 +163,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 */ @@ -170,6 +171,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(""); |
