Fix multithread encode test
authorFrank Galligan <fgalligan@google.com>
Tue, 14 Apr 2015 22:01:56 +0000 (15:01 -0700)
committerFrank Galligan <fgalligan@google.com>
Thu, 16 Apr 2015 21:20:18 +0000 (14:20 -0700)
The multithread encode test was never actually setting more than
one thread.

Change-Id: Ie7a3b7b138e88344c943bffd544cf2b4aab866a9

test/encode_test_driver.cc
test/encode_test_driver.h

index bdd71c6..ff39f1a 100644 (file)
@@ -29,8 +29,6 @@ void Encoder::InitEncoder(VideoSource *video) {
     cfg_.g_timebase = video->timebase();
     cfg_.rc_twopass_stats_in = stats_->buf();
 
-    // Default to 1 thread.
-    cfg_.g_threads = 1;
     res = vpx_codec_enc_init(&encoder_, CodecInterface(), &cfg_,
                              init_flags_);
     ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
index 7b7dd31..e16cf9c 100644 (file)
@@ -183,7 +183,10 @@ class EncoderTest {
  protected:
   explicit EncoderTest(const CodecFactory *codec)
       : codec_(codec), abort_(false), init_flags_(0), frame_flags_(0),
-        last_pts_(0) {}
+        last_pts_(0) {
+    // Default to 1 thread.
+    cfg_.g_threads = 1;
+  }
 
   virtual ~EncoderTest() {}