diff options
Diffstat (limited to 'taglib/flac/flacfile.cpp')
-rw-r--r-- | taglib/flac/flacfile.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/taglib/flac/flacfile.cpp b/taglib/flac/flacfile.cpp index b6b72960..7f437194 100644 --- a/taglib/flac/flacfile.cpp +++ b/taglib/flac/flacfile.cpp @@ -96,6 +96,18 @@ public: }; //////////////////////////////////////////////////////////////////////////////// +// static members +//////////////////////////////////////////////////////////////////////////////// + +bool FLAC::File::isSupported(IOStream *stream) +{ + // A FLAC file has an ID "fLaC" somewhere. An ID3v2 tag may precede. + + const ByteVector buffer = Utils::readHeader(stream, bufferSize(), true); + return (buffer.find("fLaC") >= 0); +} + +//////////////////////////////////////////////////////////////////////////////// // public members //////////////////////////////////////////////////////////////////////////////// |