This commit is contained in:
An Phan 2016-06-10 15:33:27 +08:00
parent 9feaaf9476
commit da5d0e22f3
No known key found for this signature in database
GPG key ID: 05536BB4BCDC02A2

View file

@ -7,7 +7,7 @@ use App\Models\Song;
class TranscodingStreamer extends Streamer implements StreamerInterface
{
/**
* Bitrate which the stream should be transcoded as.
* Bitrate the stream should be transcoded at.
*
* @var int
*/
@ -32,9 +32,8 @@ class TranscodingStreamer extends Streamer implements StreamerInterface
*/
public function stream()
{
if (!is_executable($ffmpeg = env('FFMPEG_PATH', '/usr/local/bin/ffmpeg'))) {
abort(500, 'Transcoding requires valid ffmpeg settings.');
}
$ffmpeg = env('FFMPEG_PATH', '/usr/local/bin/ffmpeg');
abort_unless(is_executable($ffmpeg), 500, 'Transcoding requires valid ffmpeg settings.');
$bitRate = filter_var($this->bitrate, FILTER_SANITIZE_NUMBER_INT);