History

Use WelsStrcat instead of the STRCAT macro

Martin Storsjö committed 12 years ago

Commit 208f0331 parent fa93c881 file · +7 −7Browse files

Showing the changes to codec/encoder/plus/src/welsEncoderExt.cpp (1 of 1 file). Show all

Unified · Split

codec/encoder/plus/src/welsEncoderExt.cpp+7−7
@@ -997,17 +997,17 @@ void CWelsH264SVCEncoder::DumpSrcPicture (const uint8_t* pSrc) { · 996 unmodified lines
997 WelsStrncpy (strFileName, 256, "pic_in_"); // confirmed_safe_unsafe_usage997 WelsStrncpy (strFileName, 256, "pic_in_"); // confirmed_safe_unsafe_usage
998 998
999 if (m_iMaxPicWidth == 640) {999 if (m_iMaxPicWidth == 640) {
1000 STRCAT (strFileName, 256, "360p."); // confirmed_safe_unsafe_usage1000 WelsStrcat (strFileName, 256, "360p."); // confirmed_safe_unsafe_usage
1001 } else if (m_iMaxPicWidth == 320) {1001 } else if (m_iMaxPicWidth == 320) {
1002 STRCAT (strFileName, 256, "180p."); // confirmed_safe_unsafe_usage1002 WelsStrcat (strFileName, 256, "180p."); // confirmed_safe_unsafe_usage
1003 } else if (m_iMaxPicWidth == 160) {1003 } else if (m_iMaxPicWidth == 160) {
1004 STRCAT (strFileName, 256, "90p."); // confirmed_safe_unsafe_usage1004 WelsStrcat (strFileName, 256, "90p."); // confirmed_safe_unsafe_usage
1005 }1005 }
1006 1006
1007 switch (m_iCspInternal) {1007 switch (m_iCspInternal) {
1008 case videoFormatI420:1008 case videoFormatI420:
1009 case videoFormatYV12:1009 case videoFormatYV12:
1010 STRCAT (strFileName, 256, "yuv"); // confirmed_safe_unsafe_usage1010 WelsStrcat (strFileName, 256, "yuv"); // confirmed_safe_unsafe_usage
1011 pFile = WelsFopen (strFileName, "ab+");1011 pFile = WelsFopen (strFileName, "ab+");
1012 // WelsLog( m_pEncContext, WELS_LOG_INFO, "WELS_CSP_I420, m_iCspInternal= 0x%x\n", m_iCspInternal);1012 // WelsLog( m_pEncContext, WELS_LOG_INFO, "WELS_CSP_I420, m_iCspInternal= 0x%x\n", m_iCspInternal);
1013 if (NULL != pFile) {1013 if (NULL != pFile) {
@@ -1017,7 +1017,7 @@ void CWelsH264SVCEncoder::DumpSrcPicture (const uint8_t* pSrc) { · 3 unmodified lines
1017 }1017 }
1018 break;1018 break;
1019 case videoFormatRGB:1019 case videoFormatRGB:
1020 STRCAT (strFileName, 256, "rgb"); // confirmed_safe_unsafe_usage1020 WelsStrcat (strFileName, 256, "rgb"); // confirmed_safe_unsafe_usage
1021 pFile = WelsFopen (strFileName, "ab+");1021 pFile = WelsFopen (strFileName, "ab+");
1022 if (NULL != pFile) {1022 if (NULL != pFile) {
1023 fwrite (pSrc, sizeof (uint8_t), iDataLength * 3, pFile);1023 fwrite (pSrc, sizeof (uint8_t), iDataLength * 3, pFile);
@@ -1025,7 +1025,7 @@ void CWelsH264SVCEncoder::DumpSrcPicture (const uint8_t* pSrc) { · 1 unmodified line
1025 fclose (pFile);1025 fclose (pFile);
1026 }1026 }
1027 case videoFormatBGR:1027 case videoFormatBGR:
1028 STRCAT (strFileName, 256, "bgr"); // confirmed_safe_unsafe_usage1028 WelsStrcat (strFileName, 256, "bgr"); // confirmed_safe_unsafe_usage
1029 pFile = WelsFopen (strFileName, "ab+");1029 pFile = WelsFopen (strFileName, "ab+");
1030 // WelsLog( m_pEncContext, WELS_LOG_INFO, "WELS_CSP_BGR, m_iCspInternal= 0x%x\n", m_iCspInternal);1030 // WelsLog( m_pEncContext, WELS_LOG_INFO, "WELS_CSP_BGR, m_iCspInternal= 0x%x\n", m_iCspInternal);
1031 if (NULL != pFile) {1031 if (NULL != pFile) {
@@ -1035,7 +1035,7 @@ void CWelsH264SVCEncoder::DumpSrcPicture (const uint8_t* pSrc) { · 3 unmodified lines
1035 }1035 }
1036 break;1036 break;
1037 case videoFormatYUY2:1037 case videoFormatYUY2:
1038 STRCAT (strFileName, 256, "yuy2"); // confirmed_safe_unsafe_usage1038 WelsStrcat (strFileName, 256, "yuy2"); // confirmed_safe_unsafe_usage
1039 pFile = WelsFopen (strFileName, "ab+");1039 pFile = WelsFopen (strFileName, "ab+");
1040 if (NULL != pFile) {1040 if (NULL != pFile) {
1041 fwrite (pSrc, sizeof (uint8_t), (CALC_BI_STRIDE (m_iMaxPicWidth, 16)) * m_iMaxPicHeight, pFile);1041 fwrite (pSrc, sizeof (uint8_t), (CALC_BI_STRIDE (m_iMaxPicWidth, 16)) * m_iMaxPicHeight, pFile);

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