- Timestamp:
- 07/02/2020 03:46:17 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ID3/module.audio-video.matroska.php
r46586 r48278 15 15 ///////////////////////////////////////////////////////////////// 16 16 17 if (!defined('GETID3_INCLUDEPATH')) { // prevent path-exposing attacks that access modules directly on public webservers 18 exit; 19 } 17 20 18 21 define('EBML_ID_CHAPTERS', 0x0043A770); // [10][43][A7][70] -- A system to define basic menus and partition data. For more detailed information, look at the Chapters Explanation. … … 330 333 } 331 334 332 $info['video']['streams'][ ] = $track_info;335 $info['video']['streams'][$trackarray['TrackUID']] = $track_info; 333 336 break; 334 337 … … 363 366 $getid3_temp = new getID3(); 364 367 if ($track_info['dataformat'] != 'flac') { 365 $getid3_temp->openfile($this->getid3->filename );368 $getid3_temp->openfile($this->getid3->filename, $this->getid3->info['filesize'], $this->getid3->fp); 366 369 } 367 370 $getid3_temp->info['avdataoffset'] = $info['matroska']['track_data_offsets'][$trackarray['TrackNumber']]['offset']; … … 479 482 } 480 483 481 $info['audio']['streams'][ ] = $track_info;484 $info['audio']['streams'][$trackarray['TrackUID']] = $track_info; 482 485 break; 483 486 } … … 508 511 } elseif (isset($info['mime_type'])) { 509 512 unset($info['mime_type']); 513 } 514 515 // use _STATISTICS_TAGS if available to set audio/video bitrates 516 if (!empty($info['matroska']['tags'])) { 517 $_STATISTICS_byTrackUID = array(); 518 foreach ($info['matroska']['tags'] as $key1 => $value1) { 519 if (!empty($value1['Targets']['TagTrackUID'][0]) && !empty($value1['SimpleTag'])) { 520 foreach ($value1['SimpleTag'] as $key2 => $value2) { 521 if (!empty($value2['TagName']) && isset($value2['TagString'])) { 522 $_STATISTICS_byTrackUID[$value1['Targets']['TagTrackUID'][0]][$value2['TagName']] = $value2['TagString']; 523 } 524 } 525 } 526 } 527 foreach (array('audio','video') as $avtype) { 528 if (!empty($info[$avtype]['streams'])) { 529 foreach ($info[$avtype]['streams'] as $trackUID => $trackdata) { 530 if (!isset($trackdata['bitrate']) && !empty($_STATISTICS_byTrackUID[$trackUID]['BPS'])) { 531 $info[$avtype]['streams'][$trackUID]['bitrate'] = (int) $_STATISTICS_byTrackUID[$trackUID]['BPS']; 532 @$info[$avtype]['bitrate'] += $info[$avtype]['streams'][$trackUID]['bitrate']; 533 } 534 } 535 } 536 } 510 537 } 511 538 … … 615 642 switch ($subelement['id']) { 616 643 644 case EBML_ID_TRACKUID: 645 $track_entry[$subelement['id_name']] = getid3_lib::PrintHexBytes($subelement['data'], true, false); 646 break; 617 647 case EBML_ID_TRACKNUMBER: 618 case EBML_ID_TRACKUID:619 648 case EBML_ID_TRACKTYPE: 620 649 case EBML_ID_MINCACHE: … … 964 993 case EBML_ID_TAGCHAPTERUID: 965 994 case EBML_ID_TAGATTACHMENTUID: 966 $targets_entry[$sub_sub_subelement['id_name']][] = getid3_lib:: BigEndian2Int($sub_sub_subelement['data']);995 $targets_entry[$sub_sub_subelement['id_name']][] = getid3_lib::PrintHexBytes($sub_sub_subelement['data'], true, false); 967 996 break; 968 997
Note: See TracChangeset
for help on using the changeset viewer.