Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 2 files). Show all
Unified · Split
| @@ -347,7 +347,10 @@ long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void* pOption) { · 346 unmodified lines | ||
| 347 | 347 | "CWelsDecoder::SetOption():DECODER_OPTION_GET_STATISTICS: this option is get-only!"); |
| 348 | 348 | return cmInitParaError; |
| 349 | 349 | } else if (eOptID == DECODER_OPTION_STATISTICS_LOG_INTERVAL) { |
| 350 | − m_pDecContext->sDecoderStatistics.iStatisticsLogInterval = (* ((unsigned int*)pOption)); | |
| 350 | + if (pOption) { | |
| 351 | + m_pDecContext->sDecoderStatistics.iStatisticsLogInterval = (* ((unsigned int*)pOption)); | |
| 352 | + return cmResultSuccess; | |
| 353 | + } | |
| 351 | 354 | } else if (eOptID == DECODER_OPTION_GET_SAR_INFO) { |
| 352 | 355 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_WARNING, |
| 353 | 356 | "CWelsDecoder::SetOption():DECODER_OPTION_GET_SAR_INFO: this option is get-only!"); |
| @@ -418,8 +421,11 @@ long CWelsDecoder::GetOption (DECODER_OPTION eOptID, void* pOption) { · 64 unmodified lines | ||
| 418 | 421 | } |
| 419 | 422 | return cmResultSuccess; |
| 420 | 423 | } else if (eOptID == DECODER_OPTION_STATISTICS_LOG_INTERVAL) { |
| 421 | − iVal = m_pDecContext->sDecoderStatistics.iStatisticsLogInterval; | |
| 422 | − * ((unsigned int*)pOption) = iVal; | |
| 424 | + if (pOption) { | |
| 425 | + iVal = m_pDecContext->sDecoderStatistics.iStatisticsLogInterval; | |
| 426 | + * ((unsigned int*)pOption) = iVal; | |
| 427 | + return cmResultSuccess; | |
| 428 | + } | |
| 423 | 429 | } else if (DECODER_OPTION_GET_SAR_INFO == eOptID) { //get decoder SAR info in VUI |
| 424 | 430 | PVuiSarInfo pVuiSarInfo = (static_cast<PVuiSarInfo> (pOption)); |
| 425 | 431 | memset (pVuiSarInfo, 0, sizeof (SVuiSarInfo)); |