Commit Graph

21 Commits

Author SHA1 Message Date
Lukáš Lalinský
f59c3b67aa Detect RIFF files with invalid chunk sizes
The bug report has a WAVE file with zero-sized 'data' chunk, which causes
TagLib to iterate over the file, 8 bytes in each iteration. The new code
adds a check for the chunk name, which forces it to mark the file as
invalid if the chunk name doesn't contain ASCII characters.

https://bugs.kde.org/show_bug.cgi?id=283412
2012-03-10 09:06:55 +01:00
Lukáš Lalinský
c21fd955ff Fix writing of new RIFF chunks at even positions
If the last chunk had an odd size, the new chunk would have been written at
odd position, which is incorrect.

This is based on the patch by Jens Dyffort, but I ended up changing the
implementation to correctly handle subsequential updates to the file.

The whole RIFF code really needs to be rewritten in a different way...

BUG:243954


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1220223 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2011-02-13 10:27:56 +00:00
Lukáš Lalinský
3741c39295 Full read/write support for FLAC pictures
NEEDS MORE TESTING

BUG:218696


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1212863 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2011-01-08 10:36:26 +00:00
Lukáš Lalinský
56343767ce Fix reading of WavPack streams without a length information in the header
When the WavPack's total_samples header fiels contains -1, try to find
the final block and get the number of samples from there as
block_index + block_samples.

BUG:258016


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1201476 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2010-11-27 20:58:57 +00:00
Lukáš Lalinský
dcef0fbad2 Read-only support for FLAC picture blocks
CCBUG:218696


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1154376 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2010-07-25 11:06:36 +00:00
Lukáš Lalinský
1d10bde500 Added reading of WAV audio length
BUG:116033


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1148614 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2010-07-11 09:47:58 +00:00
Lukáš Lalinský
ab1bc06172 Support for reading/writing tags from Monkey's Audio files
Patch by Alex Novichkov, slightly modified by me (code formatting + tests).


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1145554 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2010-07-03 11:32:27 +00:00
Lukáš Lalinský
9dcdecc810 Fix parsing of regular 32-bit integers in SynchData::toUInt()
BUG:231075


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1115275 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2010-04-15 20:22:21 +00:00
Lukáš Lalinský
e76466097b Don't upgrade ID3v2.2 TDA frame when upgrading to TRCD
We already do this for TDAT. Using both parts, the year and the date,
would be better we the code currently doesn't have enough context to
do that.

BUG:228968


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1110552 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2010-04-03 16:58:03 +00:00
Lukáš Lalinský
3943668603 Ignore trailing non-data atoms when parsing MP4 covr atoms
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1110209 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2010-04-02 12:14:32 +00:00
Lukáš Lalinský
c962d78a57 Always read tags from the first Vorbis Comment block in FLAC files
Prevously TagLib saved tags to the first block, but read them from the
last one. Having multiple VC blocks is a non-standard situation, but
this is the best we can do (libFLAC also uses the first block in the
case of multiple VC blocks). 

BUG:211089


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1043985 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2009-11-02 19:41:12 +00:00
Lukáš Lalinský
76b6d4fc9e Fixed ID3v1-style genre to string conversion in MP4 files
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1042312 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2009-10-29 15:53:20 +00:00
Lukáš Lalinský
724a68c79c Don't wrote the Vorbis framing bit to OggFLAC files
https://bugs.launchpad.net/maxosx/+bug/445970
http://www.hydrogenaudio.org/forums/index.php?showtopic=75263

CCMAIL:me@sbooth.org


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1039704 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2009-10-24 12:01:40 +00:00
Lukáš Lalinský
8636eb749a Handle RIFF chunk padding and ignore trailing garbage
This is based on patches by Marc Halbruegge, but those only deal with
read-only cases. The code now also correctly adds padding to RIFF
chunks, and calculates offsets in chunkData taking the padding into
account.

BUG:171957
BUG:175781


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1003745 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2009-07-28 18:29:39 +00:00
Lukáš Lalinský
834d9d6b23 Partial support for 64-bit atoms
We still can't handle actual 64-bit atoms, but we can handle 32-bit sizes
stored in 64 bits.

CCBUG:198730


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1001897 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2009-07-24 13:08:51 +00:00
Lukáš Lalinský
94a402395b Fix off-by-one error in MP4::Tag when looking for free padding to use
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@961160 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2009-04-29 15:12:19 +00:00
Lukáš Lalinský
5df6ef092b Add my old WMA and MP4 code. It is disabled by default, must be explicitly enabled to be compiled.
Scott: If you think this is really a bad idea, please revert.


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@883108 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2008-11-12 08:17:11 +00:00
Lukáš Lalinský
c4a21adb8e Add a hack to read ID2v2.4 frames with v2.3-like sizes, written by iTunes.
The code is inside a '#ifndef NO_ITUNES_HACKS' block, so I hope it's ok to add it.


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@743534 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2007-12-01 09:15:23 +00:00
Lukáš Lalinský
46fbd11d8f Use correct frame sizes when calculating length of MPEG 2 or 2.5 streams.
CCBUG:130185


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@740177 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2007-11-22 18:55:47 +00:00
Lukáš Lalinský
049f77f0d9 TrueAudio support.
This is last of the three formats implemented for libtunepimp, now used also by various players.

BUG:114982


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@735116 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2007-11-10 22:55:14 +00:00
Lukáš Lalinský
db0be6b8c6 Add a CppUnit-based test suite (only very few things is covered for now, but it's a start).
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@734995 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
2007-11-10 16:46:04 +00:00