1--TEST--
2Phi sources remove 001
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.optimization_level=-1
7--SKIPIF--
8<?php require_once('skipif.inc'); ?>
9--FILE--
10<?php
11function getOnlyMPEGaudioInfoBruteForce($info) {
12    $Distribution['bitrate']      = array();
13    $Distribution['frequency']    = array();
14    $Distribution['layer']        = array();
15    $Distribution['version']      = array();
16    $Distribution['padding']      = array();
17
18    $max_frames_scan = 5000;
19    $frames_scanned  = 0;
20
21    $previousvalidframe = $info['avdataoffset'];
22    while ($info) {
23        if (!isset($MPEGaudioHeaderDecodeCache[$head4])) {
24            $MPEGaudioHeaderDecodeCache[$head4] = MPEGaudioHeaderDecode($head4);
25        }
26        if (!isset($MPEGaudioHeaderValidCache[$head4])) {
27            $MPEGaudioHeaderValidCache[$head4] = MPEGaudioHeaderValid($MPEGaudioHeaderDecodeCache[$head4], false, false);
28        }
29        if ($MPEGaudioHeaderValidCache[$head4]) {
30
31            if ($MPEGaudioHeaderLengthCache[$head4] > 4) {
32                $WhereWeWere = mftell();
33                $next4 = test(4);
34                if ($next4[0] == "\xFF") {
35                    if (!isset($MPEGaudioHeaderDecodeCache[$next4])) {
36                        $MPEGaudioHeaderDecodeCache[$next4] = MPEGaudioHeaderDecode($next4);
37                    }
38                    if (!isset($MPEGaudioHeaderValidCache[$next4])) {
39                        $MPEGaudioHeaderValidCache[$next4] = MPEGaudioHeaderValid($MPEGaudioHeaderDecodeCache[$next4], false, false);
40                    }
41                    if ($MPEGaudioHeaderValidCache[$next4]) {
42                        getid3_lib::safe_inc($Distribution['bitrate'][$LongMPEGbitrateLookup[$head4]]);
43                        getid3_lib::safe_inc($Distribution['layer'][$LongMPEGlayerLookup[$head4]]);
44                        getid3_lib::safe_inc($Distribution['version'][$LongMPEGversionLookup[$head4]]);
45                        getid3_lib::safe_inc($Distribution['padding'][intval($LongMPEGpaddingLookup[$head4])]);
46                        getid3_lib::safe_inc($Distribution['frequency'][$LongMPEGfrequencyLookup[$head4]]);
47                        if ($max_frames_scan && (++$frames_scanned >= $max_frames_scan)) {
48                            foreach ($Distribution as $key1 => $value1) {
49                                foreach ($value1 as $key2 => $value2) {
50                                    $Distribution[$key1][$key2] = round($value2 / $pct_data_scanned);
51                                }
52                            }
53                            break;
54                        }
55                        continue;
56                    }
57                }
58                unset($next4);
59            }
60
61        }
62    }
63    return true;
64}
65?>
66okey
67--EXPECT--
68okey
69