From 029928569a2cf726533bd7f4b2ab8b936cce5108 Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Thu, 28 May 2009 08:22:39 +0000 Subject: [PATCH] * WAV/LPCM handling tweaks. --- tagutils/tagutils-wav.c | 4 ++-- upnpsoap.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tagutils/tagutils-wav.c b/tagutils/tagutils-wav.c index e881d6e..706c988 100644 --- a/tagutils/tagutils-wav.c +++ b/tagutils/tagutils-wav.c @@ -164,9 +164,9 @@ _get_wavtags(char *filename, struct song_metadata *psong) //DEBUG DPRINTF(E_DEBUG,L_SCANNER,"Song length: %d\n", psong->song_length); //DEBUG DPRINTF(E_DEBUG,L_SCANNER,"Bit rate: %d\n", psong->bitrate); -#if 0 // Wrong MIME type? PS3 doesn't like it; it wants audio/x-wav. + // PS3 doesn't like this; it wants audio/x-wav. I wonder why? asprintf(&(psong->mime), "audio/L16;rate=%d;channels=%d", psong->samplerate, psong->channels); -#endif + return 0; } diff --git a/upnpsoap.c b/upnpsoap.c index aa71756..a32808e 100644 --- a/upnpsoap.c +++ b/upnpsoap.c @@ -513,8 +513,8 @@ callback(void *args, int argc, char **argv, char **azColName) if( strncmp(class, "item", 4) == 0 ) { - /* We may need special handling for MIME types */ - if( strncmp(mime, "video", 5) == 0 ) + /* We may need special handling for certain MIME types */ + if( *mime == 'v' ) { switch( passed_args->client ) { @@ -544,9 +544,9 @@ callback(void *args, int argc, char **argv, char **azColName) } } } - else if( !(passed_args->flags & FLAG_DLNA) ) + else if( strncmp(mime+6, "L16", 3) == 0 ) { - if( strncmp(mime, "audio/L16", 9) == 0 ) + if( !(passed_args->flags & FLAG_DLNA) || (passed_args->client == EPS3) ) { strcpy(mime+6, "x-wav"); }