BUG FIX: Initialize AverageTestBase members
authorScott LaVarnway <slavarnway@google.com>
Wed, 27 Jun 2018 00:06:42 +0000 (17:06 -0700)
committerScott LaVarnway <slavarnway@google.com>
Wed, 27 Jun 2018 00:16:41 +0000 (17:16 -0700)
bit_depth_ was not initialized (used in FillRandom)
and caused valgrind errors.

BUG=webm:1542

Change-Id: I09a9acd54de0dfa4f9006304f45eb20883c9908c

test/avg_test.cc

index 377e542..e8cac07 100644 (file)
@@ -33,7 +33,9 @@ namespace {
 template <typename Pixel>
 class AverageTestBase : public ::testing::Test {
  public:
-  AverageTestBase(int width, int height) : width_(width), height_(height) {}
+  AverageTestBase(int width, int height)
+      : width_(width), height_(height), source_data_(NULL), source_stride_(0),
+        bit_depth_(8) {}
 
   virtual void TearDown() {
     vpx_free(source_data_);