diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2014-09-29 12:02:12 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2014-09-29 12:02:12 +0000 |
| commit | 5638a2a1b70266e7417ce5b53bc1d0cdb5037d35 (patch) | |
| tree | c4b68971ead3ef69c7c1dc4123eb246c30ff5625 /src/plugins/Input/mad/decodermadfactory.cpp | |
| parent | 729eb1013bc4614f2eb259c59f51542b1bfb5bec (diff) | |
| download | qmmp-5638a2a1b70266e7417ce5b53bc1d0cdb5037d35.tar.gz qmmp-5638a2a1b70266e7417ce5b53bc1d0cdb5037d35.tar.bz2 qmmp-5638a2a1b70266e7417ce5b53bc1d0cdb5037d35.zip | |
reduced tag reading delay
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4519 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/mad/decodermadfactory.cpp')
| -rw-r--r-- | src/plugins/Input/mad/decodermadfactory.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/Input/mad/decodermadfactory.cpp b/src/plugins/Input/mad/decodermadfactory.cpp index e45bc5d6c..c1457c29f 100644 --- a/src/plugins/Input/mad/decodermadfactory.cpp +++ b/src/plugins/Input/mad/decodermadfactory.cpp @@ -30,6 +30,9 @@ #include <taglib/apetag.h> #include <taglib/tfile.h> #include <taglib/mpegfile.h> +#if (TAGLIB_MAJOR_VERSION > 1) || ((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION >= 8)) +#include <taglib/tfilestream.h> +#endif #include "mpegmetadatamodel.h" #include "replaygainreader.h" #include "settingsdialog.h" @@ -123,7 +126,13 @@ QList<FileInfo *> DecoderMADFactory::createPlayList(const QString &fileName, boo { FileInfo *info = new FileInfo(fileName); TagLib::Tag *tag = 0; + +#if (TAGLIB_MAJOR_VERSION > 1) || ((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION >= 8)) + TagLib::FileStream stream(fileName.toLocal8Bit().constData(), true); + TagLib::MPEG::File fileRef(&stream, TagLib::ID3v2::FrameFactory::instance()); +#else TagLib::MPEG::File fileRef(fileName.toLocal8Bit ().constData()); +#endif if (useMetaData) { |
