[vlc-commits] adaptive: avoid a division by 0
Steve Lhomme
git at videolan.org
Fri Jan 12 11:07:35 CET 2018
vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jan 2 16:38:51 2018 +0100| [a9481adb172fde9a1892483a31a67a82e399c384] | committer: Jean-Baptiste Kempf
adaptive: avoid a division by 0
rate.time may not be set in some cases.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit f722ad55ef73f9d62316b9716e4c2663f55fe763)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=a9481adb172fde9a1892483a31a67a82e399c384
---
modules/demux/adaptive/http/Chunk.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/demux/adaptive/http/Chunk.cpp b/modules/demux/adaptive/http/Chunk.cpp
index a666069fca..fc167f04b9 100644
--- a/modules/demux/adaptive/http/Chunk.cpp
+++ b/modules/demux/adaptive/http/Chunk.cpp
@@ -354,7 +354,7 @@ void HTTPChunkBufferedSource::bufferize(size_t readsize)
}
}
- if(rate.size)
+ if(rate.size && rate.time)
{
connManager->updateDownloadRate(sourceid, rate.size, rate.time);
}
More information about the vlc-commits
mailing list