From f5b2971a8f93222adcceca6ced6651f1691629ea Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Tue, 10 Nov 2009 20:11:50 +0000 Subject: [PATCH] * Add 3gpp audio support. --- metadata.c | 10 ++++++++-- upnpglobalvars.h | 2 +- utils.c | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/metadata.c b/metadata.c index f4c69a3..50e47f8 100644 --- a/metadata.c +++ b/metadata.c @@ -217,6 +217,11 @@ GetAudioMetadata(const char * path, char * name) strcpy(type, "aac"); strcpy(mime, "audio/mp4"); } + else if( ends_with(path, ".3gp") ) + { + strcpy(type, "aac"); + strcpy(mime, "audio/3gpp"); + } else if( ends_with(path, ".wma") || ends_with(path, ".asf") ) { strcpy(type, "asf"); @@ -574,7 +579,7 @@ GetVideoMetadata(const char * path, char * name) memset(&m, '\0', sizeof(m)); date[0] = '\0'; - DPRINTF(E_DEBUG, L_METADATA, "Parsing video %s...\n", name); + //DEBUG DPRINTF(E_DEBUG, L_METADATA, "Parsing video %s...\n", name); if ( stat(path, &file) != 0 ) return 0; strip_ext(name); @@ -610,7 +615,8 @@ GetVideoMetadata(const char * path, char * name) if( video_stream == -1 ) { av_close_input_file(ctx); - DPRINTF(E_DEBUG, L_METADATA, "File %s does not contain a video stream.\n", basename(path)); + if( !is_audio(path) ) + DPRINTF(E_DEBUG, L_METADATA, "File %s does not contain a video stream.\n", basename(path)); return 0; } if( audio_stream >= 0 ) diff --git a/upnpglobalvars.h b/upnpglobalvars.h index 39b3dde..c191700 100644 --- a/upnpglobalvars.h +++ b/upnpglobalvars.h @@ -21,7 +21,7 @@ #include -#define MINIDLNA_VERSION "1.0.16.1" +#define MINIDLNA_VERSION "1.0.16.2" #define CLIENT_CACHE_SLOTS 20 #define USE_FORK 1 diff --git a/utils.c b/utils.c index dc6b08f..2602ee9 100644 --- a/utils.c +++ b/utils.c @@ -197,7 +197,7 @@ is_audio(const char * file) ends_with(file, ".m4a") || ends_with(file, ".aac") || ends_with(file, ".mp4") || ends_with(file, ".m4p") || ends_with(file, ".wav") || ends_with(file, ".ogg") || - ends_with(file, ".pcm")); + ends_with(file, ".pcm") || ends_with(file, ".3gp")); } int