Fix MP4 reading from very fast remotes

This commit is contained in:
Thulinma 2022-10-27 09:39:05 +02:00
parent 4181b52857
commit 63afd0b72a

View file

@ -226,7 +226,7 @@ namespace Mist{
// first we get the necessary header parts // first we get the necessary header parts
size_t tNumber = 0; size_t tNumber = 0;
activityCounter = Util::bootSecs(); activityCounter = Util::bootSecs();
while (inFile && keepRunning()){ while ((readBuffer.size() >= 16 || inFile) && keepRunning()){
//Read box header if needed //Read box header if needed
while (readBuffer.size() < 16 && inFile && keepRunning()){inFile.readSome(16, *this);} while (readBuffer.size() < 16 && inFile && keepRunning()){inFile.readSome(16, *this);}
//Failed? Abort. //Failed? Abort.