Changeset 32979 for trunk/src/wp-includes/ID3/module.audio.flac.php
- Timestamp:
- 06/28/2015 12:16:17 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ID3/module.audio.flac.php
r29734 r32979 136 136 foreach ($info['flac']['PICTURE'] as $entry) { 137 137 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); 139 149 } 140 150 } … … 344 354 345 355 $picture['typeid'] = getid3_lib::BigEndian2Int($this->fread(4)); 346 $picture[' type']= self::pictureTypeLookup($picture['typeid']);356 $picture['picturetype'] = self::pictureTypeLookup($picture['typeid']); 347 357 $picture['image_mime'] = $this->fread(getid3_lib::BigEndian2Int($this->fread(4))); 348 358 $descr_length = getid3_lib::BigEndian2Int($this->fread(4)); … … 350 360 $picture['description'] = $this->fread($descr_length); 351 361 } 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)); 354 364 $picture['color_depth'] = getid3_lib::BigEndian2Int($this->fread(4)); 355 365 $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)); 357 367 358 368 if ($picture['image_mime'] == '-->') { 359 $picture['data'] = $this->fread($ data_length);369 $picture['data'] = $this->fread($picture['datalength']); 360 370 } else { 361 371 $picture['data'] = $this->saveAttachment( 362 str_replace('/', '_', $picture[' type']).'_'.$this->ftell(),372 str_replace('/', '_', $picture['picturetype']).'_'.$this->ftell(), 363 373 $this->ftell(), 364 $ data_length,374 $picture['datalength'], 365 375 $picture['image_mime']); 366 376 }
Note: See TracChangeset
for help on using the changeset viewer.