diff --git a/src/input/input_mp4.cpp b/src/input/input_mp4.cpp index c8c8c21f..6a3f9a37 100644 --- a/src/input/input_mp4.cpp +++ b/src/input/input_mp4.cpp @@ -226,7 +226,7 @@ namespace Mist{ // first we get the necessary header parts size_t tNumber = 0; activityCounter = Util::bootSecs(); - while (inFile && keepRunning()){ + while ((readBuffer.size() >= 16 || inFile) && keepRunning()){ //Read box header if needed while (readBuffer.size() < 16 && inFile && keepRunning()){inFile.readSome(16, *this);} //Failed? Abort.