aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/qmmp/qmmpaudioengine.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/qmmp/qmmpaudioengine.cpp b/src/qmmp/qmmpaudioengine.cpp
index 4de20ed72..0b7aa8aa5 100644
--- a/src/qmmp/qmmpaudioengine.cpp
+++ b/src/qmmp/qmmpaudioengine.cpp
@@ -134,13 +134,9 @@ bool QmmpAudioEngine::enqueue(InputSource *source)
if(!factory && !source->url().contains("://"))
factory = Decoder::findByFilePath(source->url(), m_settings->determineFileTypeByContent());
if(!factory)
- {
- if((factory = Decoder::findByMime(source->contentType())))
- {
- if(!factory->canDecode(source->ioDevice()))
- factory = 0;
- }
- }
+ factory = Decoder::findByMime(source->contentType());
+ if(factory && !factory->properties().noInput && source->ioDevice() && source->url().contains("://"))
+ factory = (factory->canDecode(source->ioDevice()) ? factory : 0);
if(!factory && source->ioDevice() && source->url().contains("://")) //ignore content of local files
factory = Decoder::findByContent(source->ioDevice());
if(!factory && source->url().contains("://"))