Skip to content

Commit

Permalink
bugfix JamesHeinrich#242 filepointer analysis errors
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHeinrich committed Apr 9, 2020
1 parent 00494c9 commit 276fd3e
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion getid3/getid3.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ class getID3
*/
protected $startup_warning = '';

const VERSION = '1.9.19-202003150936';
const VERSION = '1.9.19-202004091240';
const FREAD_BUFFER_SIZE = 32768;

const ATTACHMENTS_NONE = false;
Expand Down
2 changes: 1 addition & 1 deletion getid3/module.audio-video.matroska.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ public function Analyze()
// create temp instance
$getid3_temp = new getID3();
if ($track_info['dataformat'] != 'flac') {
$getid3_temp->openfile($this->getid3->filename);
$getid3_temp->openfile($this->getid3->filename, $this->getid3->info['filesize'], $this->getid3->fp);
}
$getid3_temp->info['avdataoffset'] = $info['matroska']['track_data_offsets'][$trackarray['TrackNumber']]['offset'];
if ($track_info['dataformat'][0] == 'm' || $track_info['dataformat'] == 'flac') {
Expand Down
2 changes: 1 addition & 1 deletion getid3/module.audio-video.mpeg.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ public function Analyze() {
$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++) {
Expand Down
2 changes: 1 addition & 1 deletion getid3/module.audio-video.quicktime.php
Original file line number Diff line number Diff line change
Expand Up @@ -1481,7 +1481,7 @@ public function QuicktimeParseAtom($atomname, $atomsize, $atom_data, $baseoffset
$info['avdataend'] = $atom_structure['offset'] + $atom_structure['size']; // $info['quicktime'][$atomname]['offset'] + $info['quicktime'][$atomname]['size'];

$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['avdataoffset'] = $info['avdataoffset'];
$getid3_temp->info['avdataend'] = $info['avdataend'];
$getid3_mp3 = new getid3_mp3($getid3_temp);
Expand Down
2 changes: 1 addition & 1 deletion getid3/module.audio.bonk.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public function HandleBonkTags($BonkTagName) {
// ID3v2 checking is optional
if (class_exists('getid3_id3v2')) {
$getid3_temp = new getID3();
$getid3_temp->openfile($this->getid3->filename);
$getid3_temp->openfile($this->getid3->filename, $this->getid3->info['filesize'], $this->getid3->fp);
$getid3_id3v2 = new getid3_id3v2($getid3_temp);
$getid3_id3v2->StartingOffset = $info['bonk'][' ID3']['offset'] + 2;
$info['bonk'][' ID3']['valid'] = $getid3_id3v2->Analyze();
Expand Down
2 changes: 1 addition & 1 deletion getid3/module.audio.lpac.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function Analyze() {
}

$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_riff = new getid3_riff($getid3_temp);
$getid3_riff->Analyze();
Expand Down
4 changes: 2 additions & 2 deletions getid3/module.audio.optimfrog.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function ParseOptimFROGheader42() {
$RIFFdata = substr($RIFFdata, 0, 36).substr($RIFFdata, 44).substr($RIFFdata, 36, 8);

$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['avdataoffset'] = $info['avdataoffset'];
$getid3_temp->info['avdataend'] = $info['avdataend'];
$getid3_riff = new getid3_riff($getid3_temp);
Expand Down Expand Up @@ -310,7 +310,7 @@ public function ParseOptimFROGheader45() {
$RIFFdata = substr($RIFFdata, 0, 36).substr($RIFFdata, 44).substr($RIFFdata, 36, 8);

$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['avdataoffset'] = $info['avdataoffset'];
$getid3_temp->info['avdataend'] = $info['avdataend'];
$getid3_riff = new getid3_riff($getid3_temp);
Expand Down
4 changes: 2 additions & 2 deletions getid3/module.audio.wavpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public function Analyze() {
$original_wav_filesize = getid3_lib::LittleEndian2Int(substr($metablock['data'], 4, 4));

$getid3_temp = new getID3();
$getid3_temp->openfile($this->getid3->filename);
$getid3_temp->openfile($this->getid3->filename, $this->getid3->info['filesize'], $this->getid3->fp);
$getid3_riff = new getid3_riff($getid3_temp);
$getid3_riff->ParseRIFFdata($metablock['data']);
$metablock['riff'] = $getid3_temp->info['riff'];
Expand All @@ -246,7 +246,7 @@ public function Analyze() {

$startoffset = $metablock['offset'] + ($metablock['large_block'] ? 4 : 2);
$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['avdataend'] = $info['avdataend'];
//$getid3_temp->info['fileformat'] = 'riff';
$getid3_riff = new getid3_riff($getid3_temp);
Expand Down
2 changes: 1 addition & 1 deletion getid3/module.tag.lyrics3.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function Analyze() {
$GETID3_ERRORARRAY = &$info['warning'];
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.tag.apetag.php', __FILE__, true);
$getid3_temp = new getID3();
$getid3_temp->openfile($this->getid3->filename);
$getid3_temp->openfile($this->getid3->filename, $this->getid3->info['filesize'], $this->getid3->fp);
$getid3_apetag = new getid3_apetag($getid3_temp);
$getid3_apetag->overrideendoffset = $info['lyrics3']['tag_offset_start'];
$getid3_apetag->Analyze();
Expand Down

0 comments on commit 276fd3e

Please sign in to comment.