History

disable EC for parseonly

huili2 committed 11 years ago

Commit 900a9081 parent d92853c1 file · +7 −0Browse files

Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 1 file). Show all

Unified · Split

codec/decoder/plus/src/welsDecoderExt.cpp+7−0
@@ -285,6 +285,12 @@ long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void* pOption) { · 284 unmodified lines
285285 iVal = * ((int*)pOption); // int value for error concealment idc
286286 iVal = WELS_CLIP3 (iVal, (int32_t) ERROR_CON_DISABLE, (int32_t) ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE);
287287 m_pDecContext->eErrorConMethod = (ERROR_CON_IDC) iVal;
288+ if ((m_pDecContext->bParseOnly) && (m_pDecContext->eErrorConMethod != ERROR_CON_DISABLE)) {
289+ WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
290+ "CWelsDecoder::SetOption for ERROR_CON_IDC = %d not allowd for parse only!.", iVal);
291+ return cmInitParaError;
292+ }
293+
288294 InitErrorCon (m_pDecContext);
289295 WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
290296 "CWelsDecoder::SetOption for ERROR_CON_IDC = %d.", iVal);
@@ -551,6 +557,7 @@ DECODING_STATE CWelsDecoder::DecodeParser (const unsigned char* kpSrc, · 260 unmodified lines
551557 }
552558
553559 m_pDecContext->iErrorCode = dsErrorFree; //initialize at the starting of AU decoding.
560+ m_pDecContext->eErrorConMethod = ERROR_CON_DISABLE; //add protection to disable EC here.
554561 m_pDecContext->pParserBsInfo = pDstInfo;
555562 pDstInfo->iNalNum = 0;
556563 pDstInfo->iSpsWidthInPixel = pDstInfo->iSpsHeightInPixel = 0;

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