History

Use char instead of str_t

Martin Storsjö committed 12 years ago

Commit f2bd22a1 parent 7b96c6734 files · +131 −135Browse files

Showing the changes to codec/encoder/core/src/encoder.cpp (1 of 34 files). Show all

Unified · Split

codec/encoder/core/src/encoder.cpp+4−4
@@ -314,7 +314,7 @@ EFrameType DecideFrameType (sWelsEncCtx* pEncCtx, const int8_t kiSpatialNum) { · 313 unmodified lines
314 * \brief Dump reconstruction for dependency layer314 * \brief Dump reconstruction for dependency layer
315 */315 */
316 316
317extern "C" void DumpDependencyRec (SPicture* pCurPicture, const str_t* kpFileName, const int8_t kiDid) {317extern "C" void DumpDependencyRec (SPicture* pCurPicture, const char* kpFileName, const int8_t kiDid) {
318 WelsFileHandle* pDumpRecFile = NULL;318 WelsFileHandle* pDumpRecFile = NULL;
319 static bool bDependencyRecFlag[MAX_DEPENDENCY_LAYER] = {0};319 static bool bDependencyRecFlag[MAX_DEPENDENCY_LAYER] = {0};
320 int32_t iWrittenSize = 0;320 int32_t iWrittenSize = 0;
@@ -326,7 +326,7 @@ extern "C" void DumpDependencyRec (SPicture* pCurPicture, const str_t* kpFileNam · 5 unmodified lines
326 if (strlen (kpFileName) > 0) // confirmed_safe_unsafe_usage326 if (strlen (kpFileName) > 0) // confirmed_safe_unsafe_usage
327 pDumpRecFile = WelsFopen (kpFileName, "ab");327 pDumpRecFile = WelsFopen (kpFileName, "ab");
328 else {328 else {
329 str_t sDependencyRecFileName[16] = {0};329 char sDependencyRecFileName[16] = {0};
330 WelsSnprintf (sDependencyRecFileName, 16, "rec%d.yuv", kiDid); // confirmed_safe_unsafe_usage330 WelsSnprintf (sDependencyRecFileName, 16, "rec%d.yuv", kiDid); // confirmed_safe_unsafe_usage
331 pDumpRecFile = WelsFopen (sDependencyRecFileName, "ab");331 pDumpRecFile = WelsFopen (sDependencyRecFileName, "ab");
332 }332 }
@@ -336,7 +336,7 @@ extern "C" void DumpDependencyRec (SPicture* pCurPicture, const str_t* kpFileNam · 3 unmodified lines
336 if (strlen (kpFileName) > 0) { // confirmed_safe_unsafe_usage336 if (strlen (kpFileName) > 0) { // confirmed_safe_unsafe_usage
337 pDumpRecFile = WelsFopen (kpFileName, "wb");337 pDumpRecFile = WelsFopen (kpFileName, "wb");
338 } else {338 } else {
339 str_t sDependencyRecFileName[16] = {0};339 char sDependencyRecFileName[16] = {0};
340 WelsSnprintf (sDependencyRecFileName, 16, "rec%d.yuv", kiDid); // confirmed_safe_unsafe_usage340 WelsSnprintf (sDependencyRecFileName, 16, "rec%d.yuv", kiDid); // confirmed_safe_unsafe_usage
341 pDumpRecFile = WelsFopen (sDependencyRecFileName, "wb");341 pDumpRecFile = WelsFopen (sDependencyRecFileName, "wb");
342 }342 }
@@ -382,7 +382,7 @@ extern "C" void DumpDependencyRec (SPicture* pCurPicture, const str_t* kpFileNam · 39 unmodified lines
382 * \brief Dump the reconstruction pictures382 * \brief Dump the reconstruction pictures
383 */383 */
384 384
385void DumpRecFrame (SPicture* pCurPicture, const str_t* kpFileName) {385void DumpRecFrame (SPicture* pCurPicture, const char* kpFileName) {
386 WelsFileHandle* pDumpRecFile = NULL;386 WelsFileHandle* pDumpRecFile = NULL;
387 static bool bRecFlag = false;387 static bool bRecFlag = false;
388 int32_t iWrittenSize = 0;388 int32_t iWrittenSize = 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t