wp-includes/ID3/module.audio-video.matroska.php:2053Calculate duration from scanned cluster timecodes
$infoarrayvoid private function calculatePlaytimeFromClusters(&$info) { $minTimecode = null; $maxTimecode = null; if (isset($info['matroska']['cluster']) && is_array($info['matroska']['cluster'])) { foreach ($info['matroska']['cluster'] as $cluster) { if (isset($cluster['ClusterTimecode'])) { if ($minTimecode === null || $cluster['ClusterTimecode'] < $minTimecode) { $minTimecode = $cluster['ClusterTimecode']; } if ($maxTimecode === null || $cluster['ClusterTimecode'] > $maxTimecode) { $maxTimecode = $cluster['ClusterTimecode']; } } } } if ($maxTimecode !== null && $minTimecode !== null && $maxTimecode > $minTimecode) { $info['playtime_seconds'] = ($maxTimecode - $minTimecode) * ($this->getTimecodeScale($info) / 1000000000); } }Unchanged from 7.0.4 through 7.1.0.
Signature, return type and hooks compared across 2 parsed releases.
src/wp-includes/ID3/module.audio-video.matroska.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.