fix: Fix YoutubeStream range condition

This commit is contained in:
Pierre Rudloff 2019-04-28 21:11:08 +02:00
parent 922c1bf769
commit 296a5f96b4
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ class YoutubeStream extends AppendStream
while ($rangeStart < $contentLenghtHeader[0]) {
$rangeEnd = $rangeStart + $video->downloader_options->http_chunk_size;
if ($rangeEnd > $contentLenghtHeader[0]) {
if ($rangeEnd >= $contentLenghtHeader[0]) {
$rangeEnd = $contentLenghtHeader[0] - 1;
}
$response = $video->getHttpResponse(['Range' => 'bytes='.$rangeStart.'-'.$rangeEnd]);