You need to sign in or sign up before continuing.
Commit 45f8d473 authored by Warren Dukes's avatar Warren Dukes

assume all streams are mp3's, we'll need to open the streams before calling

the decoder routines to fetch the mime-type! git-svn-id: https://svn.musicpd.org/mpd/trunk@1054 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent 06422f72
...@@ -51,13 +51,7 @@ int isRemoteUrl(char * url) { ...@@ -51,13 +51,7 @@ int isRemoteUrl(char * url) {
while(*urlPrefixes) { while(*urlPrefixes) {
if(strncmp(*urlPrefixes,url,strlen(*urlPrefixes)) == 0) { if(strncmp(*urlPrefixes,url,strlen(*urlPrefixes)) == 0) {
#ifdef HAVE_MAD return 1;
if(hasMp3Suffix(url)) return 1;
#endif
#ifdef HAVE_OGG
if(hasOggSuffix(url)) return 1;
#endif
return 0;
} }
urlPrefixes++; urlPrefixes++;
} }
......
...@@ -161,7 +161,8 @@ int playerInit() { ...@@ -161,7 +161,8 @@ int playerInit() {
} }
int playerGetDecodeType(char * utf8file) { int playerGetDecodeType(char * utf8file) {
if(!isRemoteUrl(utf8file) && !isFile(utf8file,NULL)) return -1; if(isRemoteUrl(utf8file)) return DECODE_TYPE_MP3;
if(!isFile(utf8file,NULL)) return -1;
#ifdef HAVE_MAD #ifdef HAVE_MAD
if(hasMp3Suffix(utf8file)) return DECODE_TYPE_MP3; if(hasMp3Suffix(utf8file)) return DECODE_TYPE_MP3;
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment