WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/11/2014 07:06:33 PM (5 years ago)
Author:
wonderboymusic
Message:

Update getID3 library to 1.9.8.

Changes:
https://github.com/JamesHeinrich/getID3/compare/1.9.7...v1.9.8

Fixes #29627.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ID3/module.tag.apetag.php

    r23766 r29734  
    44//  available at http://getid3.sourceforge.net                 //
    55//            or http://www.getid3.org                         //
     6//          also https://github.com/JamesHeinrich/getID3       //
    67/////////////////////////////////////////////////////////////////
    78// See readme.txt for more details                             //
     
    3334        if ($this->overrideendoffset == 0) {
    3435
    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);
    3738
    3839            //if (preg_match('/APETAGEX.{24}TAG.{125}$/i', $APEfooterID3v1)) {
     
    5253        } else {
    5354
    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') {
    5657                $info['ape']['tag_offset_end'] = $this->overrideendoffset;
    5758            }
     
    6970        $thisfile_ape = &$info['ape'];
    7071
    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);
    7374        if (!($thisfile_ape['footer'] = $this->parseAPEheaderFooter($APEfooterData))) {
    7475            $info['error'][] = 'Error parsing APE footer at offset '.$thisfile_ape['tag_offset_end'];
     
    7778
    7879        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);
    8283        } else {
    8384            $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']);
    8687        }
    8788        $info['avdataend'] = $thisfile_ape['tag_offset_start'];
Note: See TracChangeset for help on using the changeset viewer.