Code Duplication    Length = 12-12 lines in 3 locations

3rdparty/getID3/getid3/module.audio-video.quicktime.php 3 locations

@@ 1046-1057 (lines=12) @@
1043
					break;
1044
1045
1046
				case 'stss': // Sample Table Sync Sample (key frames) atom
1047
					if ($ParseAllPossibleAtoms) {
1048
						$atom_structure['version']        = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
1049
						$atom_structure['flags_raw']      = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
1050
						$atom_structure['number_entries'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
1051
						$stssEntriesDataOffset = 8;
1052
						for ($i = 0; $i < $atom_structure['number_entries']; $i++) {
1053
							$atom_structure['time_to_sample_table'][$i] = getid3_lib::BigEndian2Int(substr($atom_data, $stssEntriesDataOffset, 4));
1054
							$stssEntriesDataOffset += 4;
1055
						}
1056
					}
1057
					break;
1058
1059
1060
				case 'stsc': // Sample Table Sample-to-Chunk atom
@@ 1095-1106 (lines=12) @@
1092
					break;
1093
1094
1095
				case 'stco': // Sample Table Chunk Offset atom
1096
//					if (true) {
1097
					if ($ParseAllPossibleAtoms) {
1098
						$atom_structure['version']        = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
1099
						$atom_structure['flags_raw']      = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
1100
						$atom_structure['number_entries'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
1101
						$stcoEntriesDataOffset = 8;
1102
						for ($i = 0; $i < $atom_structure['number_entries']; $i++) {
1103
							$atom_structure['chunk_offset_table'][$i] = getid3_lib::BigEndian2Int(substr($atom_data, $stcoEntriesDataOffset, 4));
1104
							$stcoEntriesDataOffset += 4;
1105
						}
1106
					}
1107
					break;
1108
1109
@@ 1110-1121 (lines=12) @@
1107
					break;
1108
1109
1110
				case 'co64': // Chunk Offset 64-bit (version of "stco" that supports > 2GB files)
1111
					if ($ParseAllPossibleAtoms) {
1112
						$atom_structure['version']        = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
1113
						$atom_structure['flags_raw']      = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
1114
						$atom_structure['number_entries'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 4));
1115
						$stcoEntriesDataOffset = 8;
1116
						for ($i = 0; $i < $atom_structure['number_entries']; $i++) {
1117
							$atom_structure['chunk_offset_table'][$i] = getid3_lib::BigEndian2Int(substr($atom_data, $stcoEntriesDataOffset, 8));
1118
							$stcoEntriesDataOffset += 8;
1119
						}
1120
					}
1121
					break;
1122
1123
1124
				case 'dref': // Data REFerence atom