Commit Graph
1292 Commits
Author SHA1 Message Date
Tsuda Kageyu 9419dab51b Allow SYLT frames to have a timestamp with no text.
Thanks to lemonboy999.
2017-02-24 15:40:30 +09:00
Tsuda Kageyu 45ee18e206 FilePrivate is responsible to delete a stream pointer instead of File.
Generally, TagLib leaves the Private classes to delete their members.
2017-02-08 17:49:48 +09:00
Tsuda Kageyu dd4adf94ce Fix wrong endian of boolean values when saving ASF files. 2017-02-06 10:06:10 +09:00
Tsuda Kageyu a5d9e49c49 Remove obsolete comments.
The bug mentioned in the comments are already fixed.
2017-02-04 01:31:20 +09:00
Scott Wheeler 179c175a6c Ignore warnings about OSAtomicIncrement32Barrier
The warnings suggest moving to std::atomic functions, but those are only
available in C++11.  It would be possible to switch to the C versions of
those functions, which are now provided in stdatoic.h (in C11), but
let's wait until we actually hit problems with this function and are a
few more OS versions into C11 headers being included by default.
2017-02-03 13:56:02 +00:00
Tsuda Kageyu ba98628919 Avoid searching the same area twice in MPEG::File::previousFrameOffset(). 2017-02-01 14:23:03 +09:00
Tsuda Kageyu 4552f2c2eb Remove redundant functions in tstring.cpp.
Two versions of copyFromUTF16() are almost the same.
2017-01-30 22:38:08 +09:00
Tsuda Kageyu 6398796f95 Remove function bodies of some non-specialized template functions.
The code won't link when a wrong version is used. It's better than showing a debug message.
2017-01-30 16:11:59 +09:00
Tsuda KageyuandGitHub 6a61f02f85 Merge pull request #794 from TsudaKageyu/utf8-library
Replace unicode.h/unicode.cpp by the UTF8-CPP library.
2017-01-30 12:54:43 +09:00
Tsuda Kageyu 038b52ae01 Check an invalid UTF-8 sequence consists of single char.
Single char can be an invalid UTF sequence. For example, { 0x80 } is invalid.
2017-01-30 11:35:39 +09:00
Tsuda Kageyu 598ab752bc Stop assuming that std::wstring has a contiguous and null-terminated buffer. 2017-01-30 00:36:38 +09:00
Tsuda Kageyu 922fd611ae Reduce useless memory reallocation in String::upper(). 2017-01-28 01:17:21 +09:00
Tsuda Kageyu 978b822774 Remove some redundant code in tstring.cpp. 2017-01-27 15:11:08 +09:00
Tsuda Kageyu 0c45c63943 Replace unicode.h/unicode.cpp by the UTF8-CPP library.
unicode.h/unicode.cpp are no longer maintained and incompatible with Debian's guideline.
UTF8-CPP is maintained on GitHub and published under the Boost Software License which is compatible with either LGPL or MPL and should go along with Debian's guideline.
2017-01-27 14:47:55 +09:00
Tsuda Kageyu fc38a0e401 Remove some redundant code.
TagUnion::access() does the same thing as FLAC::File::ID3v2Tag().
2017-01-22 00:43:32 +09:00
Tsuda Kageyu 5fc5a2e81a Prefer isEmpty()/empty() to size() == 0. 2017-01-21 19:10:32 +09:00
Tsuda Kageyu a358e87cc4 Revert useless changes accidentally committed. 2017-01-21 11:13:49 +09:00
Tsuda Kageyu 5ba8b740f9 Add missing consts. 2017-01-21 11:09:05 +09:00
Tsuda Kageyu c4a3c3ab97 Combine two internal functions which are always used together. 2017-01-21 01:34:50 +09:00
Tsuda Kageyu 6bb92c34fa Ignore fake MPEG frame headers when seeking them. 2017-01-20 22:38:25 +09:00
Tsuda Kageyu d2e0e55223 Efficient lookup for an ID3v2 tag in MPEG files with garbage.
This looks for an ID3v2 tag until reaching the first valid MPEG frame in O(n) time.
2017-01-20 21:14:38 +09:00
Tsuda KageyuandGitHub c9c757e0ff Merge pull request #791 from TsudaKageyu/flac-empty-seektable
Be tolerant of empty FLAC seektable blocks.
2017-01-16 01:12:07 +09:00
Tsuda Kageyu 9b548260f5 Initialize d-pointers in class member initializer list. 2017-01-16 01:05:30 +09:00
Tsuda Kageyu 406e872ac3 Always use parentheses with new. It's a bit safer. 2017-01-16 01:00:28 +09:00
Tsuda Kageyu 193cbe3b6b Initialize all the data members of ASF::Attribute. 2017-01-14 23:29:46 +09:00
Tsuda Kageyu 13be28a52c Be tolerant of empty FLAC seektable blocks. 2017-01-10 00:11:13 +09:00
Tsuda Kageyu 56a7656c2e Remove some TODO comments which are no longer necessary. 2017-01-08 01:43:04 +09:00
Michael HelmlingandGitHub c97be6630e Fix #789 (typo in member doc) 2017-01-06 09:08:02 +01:00
Tsuda Kageyu 14c3ce5737 Remove all the optional dependencies on Boost. 2016-12-20 11:54:06 +09:00
Tsuda Kageyu 8905e7095a Safer conversion of boolean values in ASF attributes.
Technically, boolean values in Extended Content Description Object is not necessarily be 0 or 1.
2016-12-19 10:37:10 +09:00
Tsuda Kageyu a19a623d4b Make use of increment/decrement operators of std::atomic. 2016-12-09 10:09:31 +09:00
Tsuda Kageyu 250c59f783 Remove optional dependencies on Boost's dynamic libraries.
Using precompiled Boost libraries can lead to depending on external dynamic libraries.
2016-12-09 09:42:29 +09:00
Hao Xi b5115e3497 Fix #667: Compiled TagLib framework for OS X fails at codesign. 2016-12-08 12:53:40 +08:00
Tsuda Kageyu 36ccad2bd4 Rewrite ByteVector::replace() to run in O(n) time. 2016-12-05 11:02:59 +09:00
Tsuda Kageyu f6a604f54b #include guards in CMake generated headers. 2016-12-02 17:26:43 +09:00
Tsuda Kageyu 9336c82da3 Fix possible Ogg packet losses. 2016-12-01 11:32:01 +09:00
Tsuda Kageyu cfbaf34597 Prevent the segment table of Ogg pages from exceeding the size limit. 2016-12-01 10:51:59 +09:00
Tsuda Kageyu 046c98230f Remove Utils::floatByteOrder() and use systemByteOrder() instead.
We can safely assume that the integer and float byte orders are the same on IEEE754 compliant systems.
2016-11-29 14:58:39 +09:00
Tsuda Kageyu 6df61cf2af Small fix in style. 2016-11-29 10:38:11 +09:00
Michael Helmling 2786aa7463 Fixes #743 by not overwriting existing Xiph comment in FLAC::File::save 2016-11-27 19:17:13 +01:00
Tsuda Kageyu d3062f3af4 A bit more tolerant check to return itself in String::substr(). 2016-11-26 13:05:14 +09:00
Martin Flaska c9a0754e3b tstring: String::substr optimization when returning itself as a substring
Use copy ctor to return in a case whole string is being returned.

The intention was to optimize String::stripWhiteSpace for no-strip case
(without any leading or trailing white space removal).

copyFromUTF16 was used in any case previously and allocated duplicate
buffer for the same string - no implicit sharing.

Signed-off-by: Martin Flaska <[email protected]>
2016-11-25 15:32:26 +01:00
mathbunnyru 5e1d9fad31 Small fixes 2016-11-24 02:05:19 +03:00
mathbunnyru eff28c55bf Increment fixes 2016-11-22 01:10:28 +03:00
Tsuda Kageyu b98a984b66 Fix handling of lowercase 'metadata_block_picture' fields in Vorbis comments.
Also refactored some redundant code for parsing pictures.
2016-11-11 00:07:32 +09:00
Tsuda Kageyu f9a747dceb Avoid adding fields with invalid keys to Vorbis Comments.
According to the spec, '\x7F' is not allowed.
2016-11-10 23:35:14 +09:00
Tsuda Kageyu 7b8d576bde Don't decode redundant UTF-8 sequences in Win32.
Linux and OS X are working well and won't be affected.
2016-11-10 17:12:58 +09:00
Tsuda Kageyu 499f6db977 Check invalid Unicode APE keys properly. 2016-11-09 00:29:03 +09:00
Tsuda Kageyu 9d58e9f8e8 Removed a utility function which is used only at one place. 2016-11-08 23:27:55 +09:00
Tsuda Kageyu d81d894d41 tolower() depends on the current locale.
It's much easier to write our own function than to use locales properly.
2016-11-08 21:39:53 +09:00