Fix MP4 input getting stuck when reading a 0 byte input

This commit is contained in:
Marco van Dijk 2022-12-07 16:20:17 +01:00 committed by Thulinma
parent f01b90f90e
commit 95c25fe966

View file

@ -420,7 +420,7 @@ namespace HTTP{
if (allData.size() && bufPos < allData.size()){return false;}
return true;
}
if ((totalSize > 0 && curPos >= totalSize) || downer.completed() || (!totalSize && !downer.getSocket())){
if ((totalSize != std::string::npos && curPos >= totalSize) || downer.completed() || (totalSize == std::string::npos && !downer.getSocket())){
if (allData.size() && bufPos < allData.size()){return false;}
return true;
}