Changeset 29734 for trunk/src/wp-includes/ID3/module.tag.apetag.php
- Timestamp:
- 09/11/2014 07:06:33 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/ID3/module.tag.apetag.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ID3/module.tag.apetag.php
r23766 r29734 4 4 // available at http://getid3.sourceforge.net // 5 5 // or http://www.getid3.org // 6 // also https://github.com/JamesHeinrich/getID3 // 6 7 ///////////////////////////////////////////////////////////////// 7 8 // See readme.txt for more details // … … 33 34 if ($this->overrideendoffset == 0) { 34 35 35 fseek($this->getid3->fp,0 - $id3v1tagsize - $apetagheadersize - $lyrics3tagsize, SEEK_END);36 $APEfooterID3v1 = fread($this->getid3->fp,$id3v1tagsize + $apetagheadersize + $lyrics3tagsize);36 $this->fseek(0 - $id3v1tagsize - $apetagheadersize - $lyrics3tagsize, SEEK_END); 37 $APEfooterID3v1 = $this->fread($id3v1tagsize + $apetagheadersize + $lyrics3tagsize); 37 38 38 39 //if (preg_match('/APETAGEX.{24}TAG.{125}$/i', $APEfooterID3v1)) { … … 52 53 } else { 53 54 54 fseek($this->getid3->fp, $this->overrideendoffset - $apetagheadersize, SEEK_SET);55 if ( fread($this->getid3->fp,8) == 'APETAGEX') {55 $this->fseek($this->overrideendoffset - $apetagheadersize); 56 if ($this->fread(8) == 'APETAGEX') { 56 57 $info['ape']['tag_offset_end'] = $this->overrideendoffset; 57 58 } … … 69 70 $thisfile_ape = &$info['ape']; 70 71 71 fseek($this->getid3->fp, $thisfile_ape['tag_offset_end'] - $apetagheadersize, SEEK_SET);72 $APEfooterData = fread($this->getid3->fp,32);72 $this->fseek($thisfile_ape['tag_offset_end'] - $apetagheadersize); 73 $APEfooterData = $this->fread(32); 73 74 if (!($thisfile_ape['footer'] = $this->parseAPEheaderFooter($APEfooterData))) { 74 75 $info['error'][] = 'Error parsing APE footer at offset '.$thisfile_ape['tag_offset_end']; … … 77 78 78 79 if (isset($thisfile_ape['footer']['flags']['header']) && $thisfile_ape['footer']['flags']['header']) { 79 fseek($this->getid3->fp, $thisfile_ape['tag_offset_end'] - $thisfile_ape['footer']['raw']['tagsize'] - $apetagheadersize, SEEK_SET);80 $thisfile_ape['tag_offset_start'] = ftell($this->getid3->fp);81 $APEtagData = fread($this->getid3->fp,$thisfile_ape['footer']['raw']['tagsize'] + $apetagheadersize);80 $this->fseek($thisfile_ape['tag_offset_end'] - $thisfile_ape['footer']['raw']['tagsize'] - $apetagheadersize); 81 $thisfile_ape['tag_offset_start'] = $this->ftell(); 82 $APEtagData = $this->fread($thisfile_ape['footer']['raw']['tagsize'] + $apetagheadersize); 82 83 } else { 83 84 $thisfile_ape['tag_offset_start'] = $thisfile_ape['tag_offset_end'] - $thisfile_ape['footer']['raw']['tagsize']; 84 fseek($this->getid3->fp, $thisfile_ape['tag_offset_start'], SEEK_SET);85 $APEtagData = fread($this->getid3->fp,$thisfile_ape['footer']['raw']['tagsize']);85 $this->fseek($thisfile_ape['tag_offset_start']); 86 $APEtagData = $this->fread($thisfile_ape['footer']['raw']['tagsize']); 86 87 } 87 88 $info['avdataend'] = $thisfile_ape['tag_offset_start'];
Note: See TracChangeset
for help on using the changeset viewer.