History

Use WelsThreadJoin on windows as well

This avoids using a separate event just for signalling that a thread has finished running.

Martin Storsjö committed 12 years ago

Commit b4aa9be1 parent 181fe0a3 files · +1 −16Browse files

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

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+1−2
@@ -2158,11 +2158,10 @@ void WelsUninitEncoderExt (sWelsEncCtx** ppCtx) { · 2157 unmodified lines
2158 if ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx] != NULL) // iThreadIdx is already created successfully2158 if ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx] != NULL) // iThreadIdx is already created successfully
2159 WelsEventSignal (& (*ppCtx)->pSliceThreading->pExitEncodeEvent[iThreadIdx]);2159 WelsEventSignal (& (*ppCtx)->pSliceThreading->pExitEncodeEvent[iThreadIdx]);
2160 WelsEventSignal (& (*ppCtx)->pSliceThreading->pThreadMasterEvent[iThreadIdx]);2160 WelsEventSignal (& (*ppCtx)->pSliceThreading->pThreadMasterEvent[iThreadIdx]);
2161 WelsThreadJoin ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]); // waiting thread exit
2161 ++ iThreadIdx;2162 ++ iThreadIdx;
2162 } while (iThreadIdx < iThreadCount);2163 } while (iThreadIdx < iThreadCount);
2163 2164
2164 WelsMultipleEventsWaitAllBlocking (iThreadCount, & (*ppCtx)->pSliceThreading->pFinSliceCodingEvent[0]);
2165
2166 }2165 }
2167#else2166#else
2168 if ((*ppCtx)->pSliceThreading->pExitEncodeEvent != NULL) {2167 if ((*ppCtx)->pSliceThreading->pExitEncodeEvent != NULL) {

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