From 5ec403144e469c39a78ab1c887614fd0255f01b3 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sun, 16 Dec 2012 17:58:50 +0400 Subject: [PATCH] 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. --- src/FFMpeg/FFProbe.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FFMpeg/FFProbe.php b/src/FFMpeg/FFProbe.php index 0303f55..4d428d2 100644 --- a/src/FFMpeg/FFProbe.php +++ b/src/FFMpeg/FFProbe.php @@ -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;