Add support for ID3v2.3 unsynchronisation

git-svn-id: http://php-reader.googlecode.com/svn/branches/zend@155 51a70ab9-7547-0410-9469-37e369ee0574
This commit is contained in:
svollbehr
2009-05-31 08:07:58 +00:00
parent 44b19c9e37
commit 752c03858a
2 changed files with 51 additions and 22 deletions

View File

@@ -290,6 +290,10 @@ abstract class Zend_Media_Id3_Frame extends Zend_Media_Id3_Object
$data = $buffer->toString();
$size = $this->_size = strlen($data);
// ID3v2.4.0 supports frame level unsynchronisation. The corresponding
// option is set to true when any of the frames use the
// unsynchronisation scheme. The usage is denoted by
// Zend_Media_Id3_Header flag that is set accordingly upon file write.
if ($this->getOption('version', 4) >= 4) {
$data = $this->_encodeUnsynchronisation($data);
if (($dataLength = strlen($data)) != $size) {