[vlc-commits] demux: adaptive: fix uninitialized average (CID #1374346)

Tristan Matthews git at videolan.org
Wed Nov 2 15:53:17 CET 2016


vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Tue Nov  1 19:04:48 2016 -0400| [0535b128b79a1bef1f43abdc97f74b23d1ef736d] | committer: Francois Cartegnie

demux: adaptive: fix uninitialized average (CID #1374346)

Signed-off-by: Francois Cartegnie <fcvlcdev at free.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0535b128b79a1bef1f43abdc97f74b23d1ef736d
---

 modules/demux/adaptive/tools/MovingAverage.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/adaptive/tools/MovingAverage.hpp b/modules/demux/adaptive/tools/MovingAverage.hpp
index 79f42ce..d79f7f4 100644
--- a/modules/demux/adaptive/tools/MovingAverage.hpp
+++ b/modules/demux/adaptive/tools/MovingAverage.hpp
@@ -54,7 +54,7 @@ namespace adaptive
     };
 
     template <class T>
-    MovingAverage<T>::MovingAverage(unsigned nbobs)
+    MovingAverage<T>::MovingAverage(unsigned nbobs) : avg(0)
     {
         if(nbobs < 1)
             throw new std::exception();



More information about the vlc-commits mailing list