|
@@ 806-824 (lines=19) @@
|
| 803 |
|
if ($max_stts_entries_to_scan < $atom_structure['number_entries']) { |
| 804 |
|
$info['warning'][] = 'QuickTime atom "stts" has '.$atom_structure['number_entries'].' but only scanning the first '.$max_stts_entries_to_scan.' entries due to limited PHP memory available ('.floor($atom_structure['number_entries'] / 1048576).'MB).'; |
| 805 |
|
} |
| 806 |
|
for ($i = 0; $i < $max_stts_entries_to_scan; $i++) { |
| 807 |
|
$atom_structure['time_to_sample_table'][$i]['sample_count'] = getid3_lib::BigEndian2Int(substr($atom_data, $sttsEntriesDataOffset, 4)); |
| 808 |
|
$sttsEntriesDataOffset += 4; |
| 809 |
|
$atom_structure['time_to_sample_table'][$i]['sample_duration'] = getid3_lib::BigEndian2Int(substr($atom_data, $sttsEntriesDataOffset, 4)); |
| 810 |
|
$sttsEntriesDataOffset += 4; |
| 811 |
|
|
| 812 |
|
$frames_count += $atom_structure['time_to_sample_table'][$i]['sample_count']; |
| 813 |
|
|
| 814 |
|
// THIS SECTION REPLACED WITH CODE IN "stbl" ATOM |
| 815 |
|
//if (!empty($info['quicktime']['time_scale']) && ($atom_structure['time_to_sample_table'][$i]['sample_duration'] > 0)) { |
| 816 |
|
// $stts_new_framerate = $info['quicktime']['time_scale'] / $atom_structure['time_to_sample_table'][$i]['sample_duration']; |
| 817 |
|
// if ($stts_new_framerate <= 60) { |
| 818 |
|
// // some atoms have durations of "1" giving a very large framerate, which probably is not right |
| 819 |
|
// $info['video']['frame_rate'] = max($info['video']['frame_rate'], $stts_new_framerate); |
| 820 |
|
// } |
| 821 |
|
//} |
| 822 |
|
// |
| 823 |
|
//$FrameRateCalculatorArray[($info['quicktime']['time_scale'] / $atom_structure['time_to_sample_table'][$i]['sample_duration'])] += $atom_structure['time_to_sample_table'][$i]['sample_count']; |
| 824 |
|
} |
| 825 |
|
$info['quicktime']['stts_framecount'][] = $frames_count; |
| 826 |
|
//$sttsFramesTotal = 0; |
| 827 |
|
//$sttsSecondsTotal = 0; |
|
@@ 1206-1213 (lines=8) @@
|
| 1203 |
|
$offset += 1; |
| 1204 |
|
|
| 1205 |
|
$atom_structure['num_iods_tracks'] = ($atom_structure['length'] - 7) / 6; // 6 bytes would only be right if all tracks use 1-byte length fields |
| 1206 |
|
for ($i = 0; $i < $atom_structure['num_iods_tracks']; $i++) { |
| 1207 |
|
$atom_structure['track'][$i]['ES_ID_IncTag'] = getid3_lib::BigEndian2Int(substr($atom_data, $offset, 1)); |
| 1208 |
|
$offset += 1; |
| 1209 |
|
$atom_structure['track'][$i]['length'] = $this->quicktime_read_mp4_descr_length($atom_data, $offset); |
| 1210 |
|
//$offset already adjusted by quicktime_read_mp4_descr_length() |
| 1211 |
|
$atom_structure['track'][$i]['track_id'] = getid3_lib::BigEndian2Int(substr($atom_data, $offset, 4)); |
| 1212 |
|
$offset += 4; |
| 1213 |
|
} |
| 1214 |
|
|
| 1215 |
|
$atom_structure['audio_profile_name'] = $this->QuicktimeIODSaudioProfileName($atom_structure['audio_profile_id']); |
| 1216 |
|
$atom_structure['video_profile_name'] = $this->QuicktimeIODSvideoProfileName($atom_structure['video_profile_id']); |