Make WordPress Core


Ignore:
Timestamp:
09/14/2019 07:06:09 PM (5 years ago)
Author:
jorbin
Message:

Update getID3 library to fix issues with PHP7.4

Updates to trunk version that includes fixes for PHP7.4

Changelog:
https://github.com/JamesHeinrich/getID3/compare/v1.9.14...00f3fbfd77e583099ca70a3cf0bc092e113d2b20

See: #47751,#47783.
Fixes: #48040.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ID3/readme.txt

    r29734 r46112  
    22/// getID3() by James Heinrich <info@getid3.org>               //
    33//  available at http://getid3.sourceforge.net                 //
    4 //            or http://www.getid3.org                         //
     4//            or https://www.getid3.org                        //
    55//          also https://github.com/JamesHeinrich/getID3       //
    66/////////////////////////////////////////////////////////////////
     
    1919GNU LGPL: https://gnu.org/licenses/lgpl.html                 (v3)
    2020
    21 Mozilla MPL: http://www.mozilla.org/MPL/2.0/                 (v2)
    22 
    23 getID3 Commercial License: http://getid3.org/#gCL (payment required)
     21Mozilla MPL: https://www.mozilla.org/MPL/2.0/                (v2)
     22
     23getID3 Commercial License: https://www.getid3.org/#gCL (payment required)
    2424
    2525*****************************************************************
     
    2929
    3030
    31        +---------------------------------------------+
    32        | If you want to donate, there is a link on   |
    33        | http://www.getid3.org for PayPal donations. |
    34        +---------------------------------------------+
     31       +----------------------------------------------+
     32       | If you want to donate, there is a link on    |
     33       | https://www.getid3.org for PayPal donations. |
     34       +----------------------------------------------+
    3535
    3636
     
    7878  * MP3/MP2/MP1
    7979  * MPC / Musepack
    80   * Ogg (Vorbis, OggFLAC, Speex)
     80  * Ogg (Vorbis, OggFLAC, Speex, Opus)
    8181  * AAC / MP4
    8282  * AC3
     
    146146===========================================================================
    147147
    148 * PHP 4.2.0 up to 5.2.x for getID3() 1.7.x (and earlier)
    149 * PHP 5.0.5 (or higher) for getID3() 1.8.x (and up)
    150 * PHP 5.0.5 (or higher) for getID3() 2.0.x (and up)
     148* PHP 4.2.0 up to 5.2.x for getID3() 1.7.x  (and earlier)
     149* PHP 5.0.5 (or higher) for getID3() 1.8.x  (and up)
     150* PHP 5.3.0 (or higher) for getID3() 1.9.17 (and up)
     151* PHP 5.3.0 (or higher) for getID3() 2.0.x  (and up)
    151152* at least 4MB memory for PHP. 8MB or more is highly recommended.
    152153  12MB is required with all modules loaded.
     
    178179$remotefilename = 'http://www.example.com/filename.mp3';
    179180if ($fp_remote = fopen($remotefilename, 'rb')) {
    180     $localtempfilename = tempnam('/tmp', 'getID3');
    181     if ($fp_local = fopen($localtempfilename, 'wb')) {
    182         while ($buffer = fread($fp_remote, 8192)) {
    183             fwrite($fp_local, $buffer);
    184         }
    185         fclose($fp_local);
     181    $localtempfilename = tempnam('/tmp', 'getID3');
     182    if ($fp_local = fopen($localtempfilename, 'wb')) {
     183        while ($buffer = fread($fp_remote, 32768)) {
     184            fwrite($fp_local, $buffer);
     185        }
     186        fclose($fp_local);
     187
     188        $remote_headers = array_change_key_case(get_headers($remotefilename, 1), CASE_LOWER);
     189        $remote_filesize = (isset($remote_headers['content-length']) ? (is_array($remote_headers['content-length']) ? $remote_headers['content-length'][count($remote_headers['content-length']) - 1] : $remote_headers['content-length']) : null);
    186190
    187191        // Initialize getID3 engine
    188192        $getID3 = new getID3;
    189193
    190         $ThisFileInfo = $getID3->analyze($filename);
    191 
    192         // Delete temporary file
    193         unlink($localtempfilename);
    194     }
    195     fclose($fp_remote);
     194        $ThisFileInfo = $getID3->analyze($localtempfilename, $remote_filesize, basename($remotefilename));
     195
     196        // Delete temporary file
     197        unlink($localtempfilename);
     198    }
     199    fclose($fp_remote);
    196200}
    197201
     202Note: since v1.9.9-20150212 it is possible a second and third parameter
     203to $getID3->analyze(), for original filesize and original filename
     204respectively. This permits you to download only a portion of a large remote
     205file but get accurate playtime estimates, assuming the format only requires
     206the beginning of the file for correct format analysis.
    198207
    199208See /demos/demo.write.php for how to write tags.
     
    293302Future Plans
    294303===========================================================================
    295 http://www.getid3.org/phpBB3/viewforum.php?f=7
     304https://www.getid3.org/phpBB3/viewforum.php?f=7
    296305
    297306* Better support for MP4 container format
     
    335344  (thanks rockcohenØmassive-interactive*nl)
    336345* Support for TTF (thanks infoØbutterflyx*com)
    337 * Support for DSS (http://www.getid3.org/phpBB3/viewtopic.php?t=171)
     346* Support for DSS (https://www.getid3.org/phpBB3/viewtopic.php?t=171)
    338347* Support for SMAF (http://smaf-yamaha.com/what/demo.html)
    339   http://www.getid3.org/phpBB3/viewtopic.php?t=182
    340 * Support for AMR (http://www.getid3.org/phpBB3/viewtopic.php?t=195)
    341 * Support for 3gpp (http://www.getid3.org/phpBB3/viewtopic.php?t=195)
     348  https://www.getid3.org/phpBB3/viewtopic.php?t=182
     349* Support for AMR (https://www.getid3.org/phpBB3/viewtopic.php?t=195)
     350* Support for 3gpp (https://www.getid3.org/phpBB3/viewtopic.php?t=195)
    342351* Support for ID4 (http://www.wackysoft.cjb.net grizlyY2KØhotmail*com)
    343352* Parse XML data returned in Ogg comments
     
    375384Known Bugs/Issues in getID3() that may be fixed eventually
    376385===========================================================================
    377 http://www.getid3.org/phpBB3/viewtopic.php?t=25
     386https://www.getid3.org/phpBB3/viewtopic.php?t=25
    378387
    379388* Cannot determine bitrate for MPEG video with VBR video data
     
    401410Known Bugs/Issues in getID3() that cannot be fixed
    402411--------------------------------------------------
    403 http://www.getid3.org/phpBB3/viewtopic.php?t=25
     412https://www.getid3.org/phpBB3/viewtopic.php?t=25
    404413
    405414* 32-bit PHP installations only:
     
    431440Known Bugs/Issues in other programs
    432441-----------------------------------
    433 http://www.getid3.org/phpBB3/viewtopic.php?t=25
    434 
     442https://www.getid3.org/phpBB3/viewtopic.php?t=25
     443
     444* MusicBrainz Picard (at least up to v1.3.2) writes multiple
     445  ID3v2.3 genres in non-standard forward-slash separated text
     446  rather than parenthesis-numeric+refinement style per the ID3v2.3
     447  specs. Tags written in ID3v2.4 mode are written correctly.
     448  (detected and worked around by getID3())
     449* PZ TagEditor v4.53.408 has been known to insert ID3v2.3 frames
     450  into an existing ID3v2.2 tag which, of course, breaks things
    435451* Windows Media Player (up to v11) and iTunes (up to v10+) do
    436452    not correctly handle ID3v2.3 tags with UTF-16BE+BOM
     
    452468* Oggenc 0.9-rc3 flags the encoded file as ABR whether it's
    453469    actually ABR or VBR.
     470* iTunes (versions "v7.0.0.70" is known-guilty, probably
     471    other versions are too) writes ID3v2.3 comment tags using an
     472    ID3v2.2 frame name (3-bytes) null-padded to 4 bytes which is
     473    not valid for ID3v2.3+
     474    (detected by getID3() since 1.9.12-201603221746)
    454475* iTunes (versions "X v2.0.3", "v3.0.1" are known-guilty, probably
    455476    other versions are too) writes ID3v2.3 comment tags using a
     
    603624* http://wyday.com/cuesharp/specification.php
    604625* http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Nikon.html
     626* http://www.codeproject.com/Articles/8295/MPEG-Audio-Frame-Header
     627* http://dsd-guide.com/sites/default/files/white-papers/DSFFileFormatSpec_E.pdf
Note: See TracChangeset for help on using the changeset viewer.