History

Merge pull request #1585 from dongzha/issue1535New

fix issue #1535 new

ruil2 committed 11 years ago

Commit dd24edc2 parents f4af5d2 f668e1b1 file · +11 −13Browse files

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

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+11−13
@@ -2272,20 +2272,18 @@ void WelsUninitEncoderExt (sWelsEncCtx** ppCtx) { · 2271 unmodified lines
22722272 const int32_t iThreadCount = (*ppCtx)->pSvcParam->iCountThreadsNum;
22732273 int32_t iThreadIdx = 0;
22742274
2275− if ((*ppCtx)->pSliceThreading->pExitEncodeEvent != NULL) {
2276− while (iThreadIdx < iThreadCount) {
2277− int res = 0;
2278− if ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]) {
2279− WelsEventSignal (& (*ppCtx)->pSliceThreading->pExitEncodeEvent[iThreadIdx]);
2280− WelsEventSignal (& (*ppCtx)->pSliceThreading->pThreadMasterEvent[iThreadIdx]);
2281− res = WelsThreadJoin ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]); // waiting thread exit
2282− WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO, "WelsUninitEncoderExt(), pthread_join(pThreadHandles%d) return %d..",
2283− iThreadIdx,
2284− res);
2285− (*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx] = 0;
2286− }
2287− ++ iThreadIdx;
2275+ while (iThreadIdx < iThreadCount) {
2276+ int res = 0;
2277+ if ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]) {
2278+ WelsEventSignal (& (*ppCtx)->pSliceThreading->pExitEncodeEvent[iThreadIdx]);
2279+ WelsEventSignal (& (*ppCtx)->pSliceThreading->pThreadMasterEvent[iThreadIdx]);
2280+ res = WelsThreadJoin ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]); // waiting thread exit
2281+ WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO, "WelsUninitEncoderExt(), pthread_join(pThreadHandles%d) return %d..",
2282+ iThreadIdx,
2283+ res);
2284+ (*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx] = 0;
22882285 }
2286+ ++ iThreadIdx;
22892287 }
22902288 }
22912289

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