summaryrefslogtreecommitdiff
path: root/src/TagStream.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2016-06-10 22:24:13 +0200
committerMax Kellermann <max@duempel.org>2016-06-10 22:24:13 +0200
commit92cdea123e9ad168c7fb9d9ec869a7512f1dca91 (patch)
tree45049939b8266972b875644654095bc8c1107e17 /src/TagStream.cxx
parente4c7e343c81fe1a847dc90cf20e9cd249ed4e353 (diff)
TagStream, decoder/Thread, ...: ignore MIME type parameters for matching plugins
Diffstat (limited to 'src/TagStream.cxx')
-rw-r--r--src/TagStream.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/TagStream.cxx b/src/TagStream.cxx
index 81e4d7679..1ffeac128 100644
--- a/src/TagStream.cxx
+++ b/src/TagStream.cxx
@@ -22,6 +22,7 @@
#include "tag/Generic.hxx"
#include "tag/TagHandler.hxx"
#include "tag/TagBuilder.hxx"
+#include "util/MimeType.hxx"
#include "util/UriUtil.hxx"
#include "util/Error.hxx"
#include "decoder/DecoderList.hxx"
@@ -51,11 +52,15 @@ tag_stream_scan(InputStream &is, const TagHandler &handler, void *ctx)
UriSuffixBuffer suffix_buffer;
const char *const suffix = uri_get_suffix(is.GetURI(), suffix_buffer);
- const char *const mime = is.GetMimeType();
+ const char *mime = is.GetMimeType();
if (suffix == nullptr && mime == nullptr)
return false;
+ std::string mime_base;
+ if (mime != nullptr)
+ mime = (mime_base = GetMimeTypeBase(mime)).c_str();
+
return decoder_plugins_try([suffix, mime, &is,
&handler, ctx](const DecoderPlugin &plugin){
is.LockRewind(IgnoreError());