Changed *nix newline symbol "\n" for constant PHP_EOL

Changed *nix newline symbol "\n" for PHP predefined constant PHP_EOL, because on Windows methods probeFormat and probeStreams returns wrong results.
This commit is contained in:
Alexander 2012-12-16 17:58:50 +04:00
commit 5ec403144e

View file

@ -53,7 +53,7 @@ class FFProbe extends Binary
$ret = array();
foreach (explode("\n", $output) as $line) {
foreach (explode(PHP_EOL, $output) as $line) {
if (in_array($line, array('[FORMAT]', '[/FORMAT]'))) {
continue;
@ -97,7 +97,7 @@ class FFProbe extends Binary
$this->binary, $pathfile, '-show_streams'
));
$output = explode("\n", $this->executeProbe($builder->getProcess()));
$output = explode(PHP_EOL, $this->executeProbe($builder->getProcess()));
$ret = array();
$n = 0;