Commit 55433941 authored by ogg.k.ogg.k's avatar ogg.k.ogg.k
Browse files

fix DurationScanner for small streams

parent 59abcced
......@@ -223,8 +223,8 @@ public class DurationScanner {
read = is.read(buffer);
}
is.close();
is = openWithConnection(url, user, password, contentLength - tailbytes);
if(responseOffset == 0) {
is = openWithConnection(url, user, password, Math.max(0, contentLength - tailbytes));
if(responseOffset == 0 && tailbytes<contentLength) {
Debug.warning("DurationScanner: Couldn't complete duration scan due to failing range requests!");
return -1;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment