Properly set size based on actual buffer layout
VP9FrameSizeTestsLarge.OneByOneVideo has been causing a failure in jenkins libvpx__unit_tests-valgrind_long for "using of uninitialized memory", the root cause was that the input image for this test was not initialized with proper size, therefore plan U and V were not initialized at all. This commit fixes the size initialization, and resolves the issue. Change-Id: Ic4dd1542b7bb0cb260a1e0aeeb505db21ae5edc8
This commit is contained in:
@@ -175,8 +175,8 @@ class DummyVideoSource : public VideoSource {
|
||||
void SetSize(unsigned int width, unsigned int height) {
|
||||
if (width != width_ || height != height_) {
|
||||
vpx_img_free(img_);
|
||||
raw_sz_ = ((width + 31)&~31) * height * 3 / 2;
|
||||
img_ = vpx_img_alloc(NULL, VPX_IMG_FMT_I420, width, height, 32);
|
||||
raw_sz_ = ((img_->w + 31) & ~31) * img_->h * 3 / 2;
|
||||
width_ = width;
|
||||
height_ = height;
|
||||
}
|
||||
|
Reference in New Issue
Block a user