// ///
/////////////////////////////////////////////////////////////////
+if (!defined('GETID3_INCLUDEPATH')) { // prevent path-exposing attacks that access modules directly on public webservers
+ exit;
+}
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.mp3.php', __FILE__, true);
class getid3_mpeg extends getid3_handler
break;
case 0xB3: // sequence_header_code
- /*
- Note: purposely doing the less-pretty (and probably a bit slower) method of using string of bits rather than bitwise operations.
- Mostly because PHP 32-bit doesn't handle unsigned integers well for bitwise operation.
- Also the MPEG stream is designed as a bitstream and often doesn't align nicely with byte boundaries.
- */
+ // Note: purposely doing the less-pretty (and probably a bit slower) method of using string of bits rather than bitwise operations.
+ // Mostly because PHP 32-bit doesn't handle unsigned integers well for bitwise operation.
+ // Also the MPEG stream is designed as a bitstream and often doesn't align nicely with byte boundaries.
$info['video']['codec'] = 'MPEG-1'; // will be updated if extension_start_code found
$bitstream = getid3_lib::BigEndian2Bin(substr($MPEGstreamData, $StartCodeOffset + 4, 8));
$info['mpeg']['packed_elementary_streams'][$PackedElementaryStream['stream_type']][$PackedElementaryStream['stream_id']][] = $PackedElementaryStream;
*/
$getid3_temp = new getID3();
- $getid3_temp->openfile($this->getid3->filename);
+ $getid3_temp->openfile($this->getid3->filename, $this->getid3->info['filesize'], $this->getid3->fp);
$getid3_temp->info = $info;
$getid3_mp3 = new getid3_mp3($getid3_temp);
for ($i = 0; $i <= 7; $i++) {
* @param int $bits_to_read
* @param bool $return_singlebit_as_boolean
*
- * @return bool|float|int
+ * @return bool|int
*/
private function readBitsFromStream(&$bitstream, &$bitstreamoffset, $bits_to_read, $return_singlebit_as_boolean=true) {
$return = bindec(substr($bitstream, $bitstreamoffset, $bits_to_read));
/**
* @param int $rawaspectratio
- * @param int $mpeg_version
+ * @param int $mpeg_version
*
* @return string
*/