ref: 8289b58daa76ab181e998a11f511fc906b0b39a3
parent: f280a71c3f300d5d42a563bc9ae21bff46a6d7aa
author: Martin Storsjö <martin@martin.st>
date: Tue Dec 26 19:05:06 EST 2017
Fix running UnsupportedVideoSizeInput under valgrind
--- a/test/api/encode_options_test.cpp
+++ b/test/api/encode_options_test.cpp
@@ -2150,6 +2150,11 @@
ASSERT_TRUE (InitialEncDec (iSrcWidth, iSrcHeight));
+ int frameSize = EncPic.iPicWidth * EncPic.iPicHeight * 3 / 2;
+ int lumaSize = EncPic.iPicWidth * EncPic.iPicHeight;
+ memset (buf_.data(), iRandValue, lumaSize);
+ memset (buf_.data() + lumaSize, rand() % 256, (frameSize - lumaSize));
+
iRet = encoder_->EncodeFrame (&EncPic, &info);
ASSERT_TRUE (iRet == cmResultSuccess) << "rv = " << iRet;