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 | "CWelsDecoder::SetOption():DECODER_OPTION_GET_STATISTICS: this option is get-only!"); | 347 | "CWelsDecoder::SetOption():DECODER_OPTION_GET_STATISTICS: this option is get-only!"); |
| 348 | return cmInitParaError; | 348 | return cmInitParaError; |
| 349 | } else if (eOptID == DECODER_OPTION_STATISTICS_LOG_INTERVAL) { | 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 | } else if (eOptID == DECODER_OPTION_GET_SAR_INFO) { | 354 | } else if (eOptID == DECODER_OPTION_GET_SAR_INFO) { |
| 352 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_WARNING, | 355 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_WARNING, |
| 353 | "CWelsDecoder::SetOption():DECODER_OPTION_GET_SAR_INFO: this option is get-only!"); | 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 | return cmResultSuccess; | 422 | return cmResultSuccess; |
| 420 | } else if (eOptID == DECODER_OPTION_STATISTICS_LOG_INTERVAL) { | 423 | } else if (eOptID == DECODER_OPTION_STATISTICS_LOG_INTERVAL) { |
| 421 | iVal = m_pDecContext->sDecoderStatistics.iStatisticsLogInterval; | 424 | if (pOption) { |
| 422 | * ((unsigned int*)pOption) = iVal; | 425 | iVal = m_pDecContext->sDecoderStatistics.iStatisticsLogInterval; |
| 426 | * ((unsigned int*)pOption) = iVal; | ||
| 427 | return cmResultSuccess; | ||
| 428 | } | ||
| 423 | } else if (DECODER_OPTION_GET_SAR_INFO == eOptID) { //get decoder SAR info in VUI | 429 | } else if (DECODER_OPTION_GET_SAR_INFO == eOptID) { //get decoder SAR info in VUI |
| 424 | PVuiSarInfo pVuiSarInfo = (static_cast<PVuiSarInfo> (pOption)); | 430 | PVuiSarInfo pVuiSarInfo = (static_cast<PVuiSarInfo> (pOption)); |
| 425 | memset (pVuiSarInfo, 0, sizeof (SVuiSarInfo)); | 431 | memset (pVuiSarInfo, 0, sizeof (SVuiSarInfo)); |