Skip to content

Commit

Permalink
input|format|output should not be null
Browse files Browse the repository at this point in the history
  • Loading branch information
BPing committed Jul 6, 2017
1 parent 5667447 commit 1d2495b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/FFMpegPush/PushVideo.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

use FFMpegPush\Command\FFMpegCommand;
use FFMpegPush\Command\FFProbeCommand;
use FFMpegPush\Exception\ConfigException;
use Psr\Log\LoggerInterface;

/**
Expand Down Expand Up @@ -75,9 +76,13 @@ public function __construct($configuration = array(), LoggerInterface $logger =
*
* @notice 阻塞
* @return PushInfo
* @throws \Exception
*/
public function push()
{
if (is_null($this->input) || is_null($this->format) || is_null($this->output)) {
throw new ConfigException('input|format|output should not be null.');
}
$this->progressListener->setPathfile($this->input->getInputVideo());
$this->command(array_merge(
$this->input->getInputs(),
Expand Down

0 comments on commit 1d2495b

Please sign in to comment.