- Timestamp:
- 07/31/2017 07:49:31 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ID3/module.audio-video.matroska.php
r32979 r41196 235 235 $this->parseEBML($info); 236 236 } catch (Exception $e) { 237 $ info['error'][] = 'EBML parser: '.$e->getMessage();237 $this->error('EBML parser: '.$e->getMessage()); 238 238 } 239 239 … … 331 331 332 332 case 'A_AC3': 333 case 'A_EAC3': 333 334 case 'A_DTS': 334 335 case 'A_MPEG/L3': 335 336 case 'A_MPEG/L2': 336 337 case 'A_FLAC': 337 getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.'.($track_info['dataformat'] == 'mp2' ? 'mp3' : $track_info['dataformat']).'.php', __FILE__, true); 338 $module_dataformat = ($track_info['dataformat'] == 'mp2' ? 'mp3' : ($track_info['dataformat'] == 'eac3' ? 'ac3' : $track_info['dataformat'])); 339 getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.'.$module_dataformat.'.php', __FILE__, true); 338 340 339 341 if (!isset($info['matroska']['track_data_offsets'][$trackarray['TrackNumber']])) { … … 353 355 354 356 // analyze 355 $class = 'getid3_'. ($track_info['dataformat'] == 'mp2' ? 'mp3' : $track_info['dataformat']);357 $class = 'getid3_'.$module_dataformat; 356 358 $header_data_key = $track_info['dataformat'][0] == 'm' ? 'mpeg' : $track_info['dataformat']; 357 359 $getid3_audio = new $class($getid3_temp, __CLASS__); … … 458 460 default: 459 461 $this->warning('Unhandled audio type "'.(isset($trackarray['CodecID']) ? $trackarray['CodecID'] : '').'"'); 462 break; 460 463 } 461 464 … … 525 528 default: 526 529 $this->unhandledElement('header', __LINE__, $element_data); 530 break; 527 531 } 528 532 … … 563 567 default: 564 568 $this->unhandledElement('seekhead.seek', __LINE__, $sub_seek_entry); } 569 break; 565 570 } 566 567 if ($seek_entry['target_id'] != EBML_ID_CLUSTER || !self::$hide_clusters) { // collect clusters only if required 571 if (!isset($seek_entry['target_id'])) { 572 $this->warning('seek_entry[target_id] unexpectedly not set at '.$seek_entry['offset']); 573 break; 574 } 575 if (($seek_entry['target_id'] != EBML_ID_CLUSTER) || !self::$hide_clusters) { // collect clusters only if required 568 576 $info['matroska']['seek'][] = $seek_entry; 569 577 } … … 572 580 default: 573 581 $this->unhandledElement('seekhead', __LINE__, $seek_entry); 582 break; 574 583 } 575 584 } … … 654 663 default: 655 664 $this->unhandledElement('track.video', __LINE__, $sub_subelement); 665 break; 656 666 } 657 667 } … … 679 689 default: 680 690 $this->unhandledElement('track.audio', __LINE__, $sub_subelement); 691 break; 681 692 } 682 693 } … … 714 725 default: 715 726 $this->unhandledElement('track.contentencodings.contentencoding.contentcompression', __LINE__, $sub_sub_sub_subelement); 727 break; 716 728 } 717 729 } … … 737 749 default: 738 750 $this->unhandledElement('track.contentencodings.contentencoding.contentcompression', __LINE__, $sub_sub_sub_subelement); 751 break; 739 752 } 740 753 } … … 743 756 default: 744 757 $this->unhandledElement('track.contentencodings.contentencoding', __LINE__, $sub_sub_subelement); 758 break; 745 759 } 746 760 } … … 749 763 default: 750 764 $this->unhandledElement('track.contentencodings', __LINE__, $sub_subelement); 765 break; 751 766 } 752 767 } … … 755 770 default: 756 771 $this->unhandledElement('track', __LINE__, $subelement); 772 break; 757 773 } 758 774 } … … 763 779 default: 764 780 $this->unhandledElement('tracks', __LINE__, $track_entry); 781 break; 765 782 } 766 783 } … … 826 843 default: 827 844 $this->unhandledElement('info.chaptertranslate', __LINE__, $sub_subelement); 845 break; 828 846 } 829 847 } … … 833 851 default: 834 852 $this->unhandledElement('info', __LINE__, $subelement); 853 break; 835 854 } 836 855 } … … 869 888 default: 870 889 $this->unhandledElement('cues.cuepoint.cuetrackpositions', __LINE__, $sub_sub_subelement); 890 break; 871 891 } 872 892 } … … 880 900 default: 881 901 $this->unhandledElement('cues.cuepoint', __LINE__, $sub_subelement); 902 break; 882 903 } 883 904 } … … 887 908 default: 888 909 $this->unhandledElement('cues', __LINE__, $subelement); 910 break; 889 911 } 890 912 } … … 928 950 default: 929 951 $this->unhandledElement('tags.tag.targets', __LINE__, $sub_sub_subelement); 952 break; 930 953 } 931 954 } … … 939 962 default: 940 963 $this->unhandledElement('tags.tag', __LINE__, $sub_subelement); 964 break; 941 965 } 942 966 } … … 946 970 default: 947 971 $this->unhandledElement('tags', __LINE__, $subelement); 972 break; 948 973 } 949 974 } … … 986 1011 default: 987 1012 $this->unhandledElement('attachments.attachedfile', __LINE__, $sub_subelement); 1013 break; 988 1014 } 989 1015 } … … 993 1019 default: 994 1020 $this->unhandledElement('attachments', __LINE__, $subelement); 1021 break; 995 1022 } 996 1023 } … … 1052 1079 default: 1053 1080 $this->unhandledElement('chapters.editionentry.chapteratom.chaptertrack', __LINE__, $sub_sub_sub_subelement); 1081 break; 1054 1082 } 1055 1083 } … … 1071 1099 default: 1072 1100 $this->unhandledElement('chapters.editionentry.chapteratom.chapterdisplay', __LINE__, $sub_sub_sub_subelement); 1101 break; 1073 1102 } 1074 1103 } … … 1078 1107 default: 1079 1108 $this->unhandledElement('chapters.editionentry.chapteratom', __LINE__, $sub_sub_subelement); 1109 break; 1080 1110 } 1081 1111 } … … 1085 1115 default: 1086 1116 $this->unhandledElement('chapters.editionentry', __LINE__, $sub_subelement); 1117 break; 1087 1118 } 1088 1119 } … … 1092 1123 default: 1093 1124 $this->unhandledElement('chapters', __LINE__, $subelement); 1125 break; 1094 1126 } 1095 1127 } … … 1120 1152 default: 1121 1153 $this->unhandledElement('cluster.silenttracks', __LINE__, $sub_subelement); 1154 break; 1122 1155 } 1123 1156 } … … 1150 1183 default: 1151 1184 $this->unhandledElement('clusters.blockgroup', __LINE__, $sub_subelement); 1185 break; 1152 1186 } 1153 1187 } … … 1161 1195 default: 1162 1196 $this->unhandledElement('cluster', __LINE__, $subelement); 1197 break; 1163 1198 } 1164 1199 $this->current_offset = $subelement['end']; … … 1182 1217 default: 1183 1218 $this->unhandledElement('segment', __LINE__, $element_data); 1219 break; 1184 1220 } 1185 1221 } … … 1188 1224 default: 1189 1225 $this->unhandledElement('root', __LINE__, $top_element); 1226 break; 1190 1227 } 1191 1228 } … … 1340 1377 default: 1341 1378 $this->unhandledElement('tag.simpletag', __LINE__, $element); 1379 break; 1342 1380 } 1343 1381 } … … 1491 1529 $CodecIDlist['A_AAC/MPEG2/LC'] = 'aac'; 1492 1530 $CodecIDlist['A_AC3'] = 'ac3'; 1531 $CodecIDlist['A_EAC3'] = 'eac3'; 1493 1532 $CodecIDlist['A_DTS'] = 'dts'; 1494 1533 $CodecIDlist['A_FLAC'] = 'flac';
Note: See TracChangeset
for help on using the changeset viewer.