shithub: openh264

Download patch

ref: 497b38e34125ff33d69ec24d34b75f1361b334c2
parent: e29ceca39267a98ca93088392bd2a7e44470e6f1
parent: 7208ed14b137582c16dc6231ecc1f12f7f99d71c
author: Ethan Hugg <[email protected]>
date: Mon Feb 23 08:52:19 EST 2015

Merge pull request #1815 from mstorsjo/test-param-strings

Store a const char* instead of a std::string in gtest parameter arrays

--- a/test/api/encode_decode_api_test.cpp
+++ b/test/api/encode_decode_api_test.cpp
@@ -3401,7 +3401,7 @@
   int uiMaxNalLen;
   float fFramerate;
   int iThreads;
-  std::string sFileSave;
+  const char* sFileSave;
 };
 
 static const EncodeOptionParam kOptionParamArray[] = {
@@ -3466,8 +3466,8 @@
   srand(1002);
   EncodeOptionParam p = GetParam();
   FILE * pFile = NULL;
-  if(!p.sFileSave.empty()) {
-    pFile = fopen(p.sFileSave.c_str(), "wb");
+  if (p.sFileSave != NULL && strlen(p.sFileSave) > 0) {
+    pFile = fopen(p.sFileSave, "wb");
   }
   memset (&param_, 0, sizeof (SEncParamExt));
   encoder_->GetDefaultParams (&param_);