History

Consistently use the compat wrappers for file IO

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*.

Martin Storsjö committed 12 years ago

Commit 3559f421 parent e17e6646 files · +31 −26Browse files

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

Unified · Split

codec/encoder/plus/src/welsEncoderExt.cpp+6−6
@@ -164,11 +164,11 @@ CWelsH264SVCEncoder::~CWelsH264SVCEncoder() { · 163 unmodified lines
164164
165165 #ifdef OUTPUT_BIT_STREAM
166166 if (m_pFileBs) {
167− fclose (m_pFileBs);
167+ WelsFclose (m_pFileBs);
168168 m_pFileBs = NULL;
169169 }
170170 if (m_pFileBsSize) {
171− fclose (m_pFileBsSize);
171+ WelsFclose (m_pFileBsSize);
172172 m_pFileBsSize = NULL;
173173 }
174174 m_bSwitch = FALSE;
@@ -585,11 +585,11 @@ int CWelsH264SVCEncoder::EncodeFrame2 (const SSourcePicture** pSrcPicList, int · 410 unmodified lines
585585
586586 if (m_bSwitch) {
587587 if (m_pFileBs) {
588− fclose (m_pFileBs);
588+ WelsFclose (m_pFileBs);
589589 m_pFileBs = NULL;
590590 }
591591 if (m_pFileBsSize) {
592− fclose (m_pFileBsSize);
592+ WelsFclose (m_pFileBsSize);
593593 m_pFileBsSize = NULL;
594594 }
595595 str_t strStreamFileName[128] = {0};
@@ -613,11 +613,11 @@ int CWelsH264SVCEncoder::EncodeFrame2 (const SSourcePicture** pSrcPicList, int · 17 unmodified lines
613613 }
614614 total_bits += iCurLayerBits;
615615 if (m_pFileBs != NULL)
616− fwrite (pLayer->pBsBuf, 1, iCurLayerBits, m_pFileBs);
616+ WelsFwrite (pLayer->pBsBuf, 1, iCurLayerBits, m_pFileBs);
617617 }
618618
619619 if (m_pFileBsSize != NULL)
620− fwrite (&total_bits, sizeof (int32_t), 1, m_pFileBsSize);
620+ WelsFwrite (&total_bits, sizeof (int32_t), 1, m_pFileBsSize);
621621 }
622622 #endif //OUTPUT_BIT_STREAM
623623 #ifdef DUMP_SRC_PICTURE

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