Skip to content

Commit ab732c2

Browse files
committed
Fix deadlock at the end of decoding.
For some h264 files, h264dec hangs at the end of decoding. This is regression caused by the commit 1c23887. This patch fixes the issue by adding SET_EVENT(&m_sReleaseBufferEvent) to SetOption( DECODER_OPTION_END_OF_STREAM).
1 parent 478e5ab commit ab732c2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

codec/decoder/plus/src/welsDecoderExt.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,8 @@ long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void* pOption) {
513513
if (pDecContext == NULL) return dsInitialOptExpected;
514514

515515
pDecContext->bEndOfStreamFlag = iVal ? true : false;
516+
if (iVal && m_iThreadCount >= 1)
517+
SET_EVENT (&m_sReleaseBufferEvent);
516518

517519
return cmResultSuccess;
518520
} else if (eOptID == DECODER_OPTION_ERROR_CON_IDC) { // Indicate error concealment status

0 commit comments

Comments
 (0)