Make WordPress Core


Ignore:
Timestamp:
06/28/2015 12:16:17 AM (9 years ago)
Author:
wonderboymusic
Message:

Update getID3 to 1.9.9

Changelog:

Fixes #32806.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ID3/module.audio.flac.php

    r29734 r32979  
    136136            foreach ($info['flac']['PICTURE'] as $entry) {
    137137                if (!empty($entry['data'])) {
    138                     $info['flac']['comments']['picture'][] = array('image_mime'=>$entry['image_mime'], 'data'=>$entry['data']);
     138                    if (!isset($info['flac']['comments']['picture'])) {
     139                        $info['flac']['comments']['picture'] = array();
     140                    }
     141                    $comments_picture_data = array();
     142                    foreach (array('data', 'image_mime', 'image_width', 'image_height', 'imagetype', 'picturetype', 'description', 'datalength') as $picture_key) {
     143                        if (isset($entry[$picture_key])) {
     144                            $comments_picture_data[$picture_key] = $entry[$picture_key];
     145                        }
     146                    }
     147                    $info['flac']['comments']['picture'][] = $comments_picture_data;
     148                    unset($comments_picture_data);
    139149                }
    140150            }
     
    344354
    345355        $picture['typeid']         = getid3_lib::BigEndian2Int($this->fread(4));
    346         $picture['type']           = self::pictureTypeLookup($picture['typeid']);
     356        $picture['picturetype']    = self::pictureTypeLookup($picture['typeid']);
    347357        $picture['image_mime']     = $this->fread(getid3_lib::BigEndian2Int($this->fread(4)));
    348358        $descr_length              = getid3_lib::BigEndian2Int($this->fread(4));
     
    350360            $picture['description'] = $this->fread($descr_length);
    351361        }
    352         $picture['width']          = getid3_lib::BigEndian2Int($this->fread(4));
    353         $picture['height']         = getid3_lib::BigEndian2Int($this->fread(4));
     362        $picture['image_width']    = getid3_lib::BigEndian2Int($this->fread(4));
     363        $picture['image_height']   = getid3_lib::BigEndian2Int($this->fread(4));
    354364        $picture['color_depth']    = getid3_lib::BigEndian2Int($this->fread(4));
    355365        $picture['colors_indexed'] = getid3_lib::BigEndian2Int($this->fread(4));
    356         $data_length               = getid3_lib::BigEndian2Int($this->fread(4));
     366        $picture['datalength']     = getid3_lib::BigEndian2Int($this->fread(4));
    357367
    358368        if ($picture['image_mime'] == '-->') {
    359             $picture['data'] = $this->fread($data_length);
     369            $picture['data'] = $this->fread($picture['datalength']);
    360370        } else {
    361371            $picture['data'] = $this->saveAttachment(
    362                 str_replace('/', '_', $picture['type']).'_'.$this->ftell(),
     372                str_replace('/', '_', $picture['picturetype']).'_'.$this->ftell(),
    363373                $this->ftell(),
    364                 $data_length,
     374                $picture['datalength'],
    365375                $picture['image_mime']);
    366376        }
Note: See TracChangeset for help on using the changeset viewer.