Improve robustness in case of bad packets.
This commit is contained in:
@@ -277,6 +277,7 @@ def downloadMovie(url, outputFileName):
|
|||||||
output.write(chunk)
|
output.write(chunk)
|
||||||
if nbiters == 1000:
|
if nbiters == 1000:
|
||||||
lastTS = getLastTSFromFD(outputFD)
|
lastTS = getLastTSFromFD(outputFD)
|
||||||
|
if lastTS != None:
|
||||||
delta = lastTS-initialTS
|
delta = lastTS-initialTS
|
||||||
ratio = delta/total
|
ratio = delta/total
|
||||||
length = fstat(outputFD).st_size
|
length = fstat(outputFD).st_size
|
||||||
|
|||||||
Reference in New Issue
Block a user