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
164 164
165#ifdef OUTPUT_BIT_STREAM165#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_STREAM622#endif //OUTPUT_BIT_STREAM
623#ifdef DUMP_SRC_PICTURE623#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