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/plus/src/welsEncoderExt.cpp (1 of 34 files). Show all

Unified · Split

codec/encoder/plus/src/welsEncoderExt.cpp+5−5
@@ -74,12 +74,12 @@ CWelsH264SVCEncoder::CWelsH264SVCEncoder() · 73 unmodified lines
74#endif//REC_FRAME_COUNT74#endif//REC_FRAME_COUNT
75 75
76#ifdef OUTPUT_BIT_STREAM76#ifdef OUTPUT_BIT_STREAM
77 str_t strStreamFileName[1024] = { 0 }; //for .26477 char strStreamFileName[1024] = { 0 }; //for .264
78 int32_t iBufferUsed = 0;78 int32_t iBufferUsed = 0;
79 int32_t iBufferLeft = 1023;79 int32_t iBufferLeft = 1023;
80 int32_t iCurUsed;80 int32_t iCurUsed;
81 81
82 str_t strLenFileName[1024] = { 0 }; //for .len82 char strLenFileName[1024] = { 0 }; //for .len
83 int32_t iBufferUsedSize = 0;83 int32_t iBufferUsedSize = 0;
84 int32_t iBufferLeftSize = 1023;84 int32_t iBufferLeftSize = 1023;
85 int32_t iCurUsedSize;85 int32_t iCurUsedSize;
@@ -578,7 +578,7 @@ int CWelsH264SVCEncoder::EncodeFrame2 (const SSourcePicture** pSrcPicList, int · 492 unmodified lines
578 WelsFclose (m_pFileBsSize);578 WelsFclose (m_pFileBsSize);
579 m_pFileBsSize = NULL;579 m_pFileBsSize = NULL;
580 }580 }
581 str_t strStreamFileName[128] = {0};581 char strStreamFileName[128] = {0};
582 int32_t iLen = WelsSnprintf (strStreamFileName, 128, "adj%d_w%d.264", m_iSwitchTimes,582 int32_t iLen = WelsSnprintf (strStreamFileName, 128, "adj%d_w%d.264", m_iSwitchTimes,
583 m_pEncContext->pSvcParam->iActualPicWidth);583 m_pEncContext->pSvcParam->iActualPicWidth);
584 m_pFileBs = WelsFopen (strStreamFileName, "wb");584 m_pFileBs = WelsFopen (strStreamFileName, "wb");
@@ -910,7 +910,7 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 325 unmodified lines
910 break;910 break;
911 case ENCODER_OPTION_CURRENT_PATH: {911 case ENCODER_OPTION_CURRENT_PATH: {
912 if (m_pEncContext->pSvcParam != NULL) {912 if (m_pEncContext->pSvcParam != NULL) {
913 str_t* path = static_cast<str_t*> (pOption);913 char* path = static_cast<char*> (pOption);
914 m_pEncContext->pSvcParam->pCurPath = path;914 m_pEncContext->pSvcParam->pCurPath = path;
915 }915 }
916 }916 }
@@ -991,7 +991,7 @@ int CWelsH264SVCEncoder::GetOption (ENCODER_OPTION eOptionId, void* pOption) { · 74 unmodified lines
991void CWelsH264SVCEncoder::DumpSrcPicture (const uint8_t* pSrc) {991void CWelsH264SVCEncoder::DumpSrcPicture (const uint8_t* pSrc) {
992#ifdef DUMP_SRC_PICTURE992#ifdef DUMP_SRC_PICTURE
993 FILE* pFile = NULL;993 FILE* pFile = NULL;
994 str_t strFileName[256] = {0};994 char strFileName[256] = {0};
995 const int32_t iDataLength = m_iMaxPicWidth * m_iMaxPicHeight;995 const int32_t iDataLength = m_iMaxPicWidth * m_iMaxPicHeight;
996 996
997 WelsStrncpy (strFileName, 256, "pic_in_"); // confirmed_safe_unsafe_usage997 WelsStrncpy (strFileName, 256, "pic_in_"); // confirmed_safe_unsafe_usage

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