From 95c25fe966ecf652a6245292384d76cd5f96eb12 Mon Sep 17 00:00:00 2001 From: Marco van Dijk Date: Wed, 7 Dec 2022 16:20:17 +0100 Subject: [PATCH] Fix MP4 input getting stuck when reading a 0 byte input --- lib/urireader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/urireader.cpp b/lib/urireader.cpp index 78658c46..ddf60011 100644 --- a/lib/urireader.cpp +++ b/lib/urireader.cpp @@ -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; }