| @@ 161-174 (lines=14) @@ | ||
| 158 | $info['avdataoffset'] += $offset; |
|
| 159 | } |
|
| 160 | ||
| 161 | if ($thisfile_monkeysaudio_raw['nVersion'] >= 3980) { |
|
| 162 | if ($thisfile_monkeysaudio_raw['cFileMD5'] === str_repeat("\x00", 16)) { |
|
| 163 | //$this->warning('cFileMD5 is null'); |
|
| 164 | } else { |
|
| 165 | $info['md5_data_source'] = ''; |
|
| 166 | $md5 = $thisfile_monkeysaudio_raw['cFileMD5']; |
|
| 167 | for ($i = 0; $i < strlen($md5); $i++) { |
|
| 168 | $info['md5_data_source'] .= str_pad(dechex(ord($md5[$i])), 2, '00', STR_PAD_LEFT); |
|
| 169 | } |
|
| 170 | if (!preg_match('/^[0-9a-f]{32}$/', $info['md5_data_source'])) { |
|
| 171 | unset($info['md5_data_source']); |
|
| 172 | } |
|
| 173 | } |
|
| 174 | } |
|
| 175 | ||
| 176 | ||
| 177 | ||
| @@ 153-166 (lines=14) @@ | ||
| 150 | $thisfile_takaudio['bitrate'] = (($thisfile_takaudio['samples'] * $thisfile_takaudio['channels'] * $thisfile_takaudio['bits_per_sample']) / $thisfile_takaudio['playtime']) * $thisfile_takaudio['compression_ratio']; |
|
| 151 | $info['audio']['bitrate'] = $thisfile_takaudio['bitrate']; |
|
| 152 | ||
| 153 | if (empty($thisfile_takaudio_raw['MD5Data'])) { |
|
| 154 | //$this->warning('MD5Data is not set'); |
|
| 155 | } elseif ($thisfile_takaudio_raw['MD5Data'] === str_repeat("\x00", 16)) { |
|
| 156 | //$this->warning('MD5Data is null'); |
|
| 157 | } else { |
|
| 158 | $info['md5_data_source'] = ''; |
|
| 159 | $md5 = $thisfile_takaudio_raw['MD5Data']; |
|
| 160 | for ($i = 0; $i < strlen($md5); $i++) { |
|
| 161 | $info['md5_data_source'] .= str_pad(dechex(ord($md5[$i])), 2, '00', STR_PAD_LEFT); |
|
| 162 | } |
|
| 163 | if (!preg_match('/^[0-9a-f]{32}$/', $info['md5_data_source'])) { |
|
| 164 | unset($info['md5_data_source']); |
|
| 165 | } |
|
| 166 | } |
|
| 167 | ||
| 168 | foreach (array('bits_per_sample', 'version', 'profile') as $key) { |
|
| 169 | if (!empty($thisfile_takaudio[$key])) { |
|