Minor fixes

git-svn-id: http://php-reader.googlecode.com/svn/trunk@126 51a70ab9-7547-0410-9469-37e369ee0574
This commit is contained in:
svollbehr
2008-12-13 22:21:35 +00:00
parent 2d31422910
commit b4cae3bf42
2 changed files with 9 additions and 7 deletions

View File

@@ -259,19 +259,18 @@ class MPEG_ABS_Frame extends MPEG_ABS_Object
$this->_copyright = Twiddling::testBit($header, 3);
$this->_original = Twiddling::testBit($header, 2);
$this->_emphasis = Twiddling::getValue($header, 0, 1);
$this->_length = (int)
((self::$coefficients[$this->_frequencyType][$this->_layer] *
($this->_bitrate * 1000) / $this->_samplingFrequency) +
($this->_padding ? 1 : 0)) * self::$slotsizes[$this->_layer];
$this->_samples = self::$samples[$this->_frequencyType][$this->_layer];
if ($this->getOption("readmode", "lazy") == "lazy")
$this->_reader->skip($this->_length - 4);
else { // full
if ($this->getOption("readmode", "lazy") == "full") {
$this->_readCrc();
$this->_readData();
}
$this->_reader->skip($this->_length - 4);
}
/**
@@ -473,7 +472,7 @@ class MPEG_ABS_Frame extends MPEG_ABS_Object
if ($this->hasRedundancy()) {
$offset = $this->_reader->getOffset();
$this->_reader->setOffset($this->_offset + 4);
$this->_crc = $reader->readUInt16BE();
$this->_crc = $this->_reader->readUInt16BE();
$this->_reader->setOffset($offset);
}
}