As long as WelsFileHandle* is equal to FILE* this doesn't matter, but for consistency use the WelsF* functions for all handles opened by WelsFopen, and use WelsFileHandle* as type for it instead of FILE*.
Showing the changes to codec/encoder/plus/src/welsEncoderExt.cpp (1 of 6 files). Show all
Unified · Split
| @@ -164,11 +164,11 @@ CWelsH264SVCEncoder::~CWelsH264SVCEncoder() { · 163 unmodified lines | |||
| 164 | 164 | ||
| 165 | #ifdef OUTPUT_BIT_STREAM | 165 | #ifdef OUTPUT_BIT_STREAM |
| 166 | if (m_pFileBs) { | 166 | if (m_pFileBs) { |
| 167 | fclose (m_pFileBs); | 167 | WelsFclose (m_pFileBs); |
| 168 | m_pFileBs = NULL; | 168 | m_pFileBs = NULL; |
| 169 | } | 169 | } |
| 170 | if (m_pFileBsSize) { | 170 | if (m_pFileBsSize) { |
| 171 | fclose (m_pFileBsSize); | 171 | WelsFclose (m_pFileBsSize); |
| 172 | m_pFileBsSize = NULL; | 172 | m_pFileBsSize = NULL; |
| 173 | } | 173 | } |
| 174 | m_bSwitch = FALSE; | 174 | m_bSwitch = FALSE; |
| @@ -585,11 +585,11 @@ int CWelsH264SVCEncoder::EncodeFrame2 (const SSourcePicture** pSrcPicList, int · 410 unmodified lines | |||
| 585 | 585 | ||
| 586 | if (m_bSwitch) { | 586 | if (m_bSwitch) { |
| 587 | if (m_pFileBs) { | 587 | if (m_pFileBs) { |
| 588 | fclose (m_pFileBs); | 588 | WelsFclose (m_pFileBs); |
| 589 | m_pFileBs = NULL; | 589 | m_pFileBs = NULL; |
| 590 | } | 590 | } |
| 591 | if (m_pFileBsSize) { | 591 | if (m_pFileBsSize) { |
| 592 | fclose (m_pFileBsSize); | 592 | WelsFclose (m_pFileBsSize); |
| 593 | m_pFileBsSize = NULL; | 593 | m_pFileBsSize = NULL; |
| 594 | } | 594 | } |
| 595 | str_t strStreamFileName[128] = {0}; | 595 | str_t strStreamFileName[128] = {0}; |
| @@ -613,11 +613,11 @@ int CWelsH264SVCEncoder::EncodeFrame2 (const SSourcePicture** pSrcPicList, int · 17 unmodified lines | |||
| 613 | } | 613 | } |
| 614 | total_bits += iCurLayerBits; | 614 | total_bits += iCurLayerBits; |
| 615 | if (m_pFileBs != NULL) | 615 | if (m_pFileBs != NULL) |
| 616 | fwrite (pLayer->pBsBuf, 1, iCurLayerBits, m_pFileBs); | 616 | WelsFwrite (pLayer->pBsBuf, 1, iCurLayerBits, m_pFileBs); |
| 617 | } | 617 | } |
| 618 | 618 | ||
| 619 | if (m_pFileBsSize != NULL) | 619 | if (m_pFileBsSize != NULL) |
| 620 | fwrite (&total_bits, sizeof (int32_t), 1, m_pFileBsSize); | 620 | WelsFwrite (&total_bits, sizeof (int32_t), 1, m_pFileBsSize); |
| 621 | } | 621 | } |
| 622 | #endif //OUTPUT_BIT_STREAM | 622 | #endif //OUTPUT_BIT_STREAM |
| 623 | #ifdef DUMP_SRC_PICTURE | 623 | #ifdef DUMP_SRC_PICTURE |