Merge pull request #1815 from mstorsjo/test-param-strings
Store a const char* instead of a std::string in gtest parameter arrays
This commit is contained in:
commit
497b38e341
@ -3401,7 +3401,7 @@ struct EncodeOptionParam {
|
|||||||
int uiMaxNalLen;
|
int uiMaxNalLen;
|
||||||
float fFramerate;
|
float fFramerate;
|
||||||
int iThreads;
|
int iThreads;
|
||||||
std::string sFileSave;
|
const char* sFileSave;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const EncodeOptionParam kOptionParamArray[] = {
|
static const EncodeOptionParam kOptionParamArray[] = {
|
||||||
@ -3466,8 +3466,8 @@ TEST_P (EncodeTestAPI, SetEncOptionSize) {
|
|||||||
srand(1002);
|
srand(1002);
|
||||||
EncodeOptionParam p = GetParam();
|
EncodeOptionParam p = GetParam();
|
||||||
FILE * pFile = NULL;
|
FILE * pFile = NULL;
|
||||||
if(!p.sFileSave.empty()) {
|
if (p.sFileSave != NULL && strlen(p.sFileSave) > 0) {
|
||||||
pFile = fopen(p.sFileSave.c_str(), "wb");
|
pFile = fopen(p.sFileSave, "wb");
|
||||||
}
|
}
|
||||||
memset (¶m_, 0, sizeof (SEncParamExt));
|
memset (¶m_, 0, sizeof (SEncParamExt));
|
||||||
encoder_->GetDefaultParams (¶m_);
|
encoder_->GetDefaultParams (¶m_);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user