shithub: libvpx

Download patch

ref: e0330c48100c721cd87c07ec9397b2ff2eda76ae
parent: 88d11f473c7020a5da63ff8cbc1e32a21dd27898
author: Johann <johannkoenig@google.com>
date: Wed Jun 7 08:25:05 EDT 2017

buffer.h: Only allow Init() to be called once.

Change-Id: I041c8b6f314802833c5287a176dbfeec9461b08e

--- a/test/buffer.h
+++ b/test/buffer.h
@@ -95,6 +95,7 @@
   bool CheckValues(const Buffer<T> &a) const;
 
   bool Init() {
+    if (raw_buffer_ != NULL) return false;
     EXPECT_GT(width_, 0);
     EXPECT_GT(height_, 0);
     EXPECT_GE(top_padding_, 0);