Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 3 files). Show all
Unified · Split
| @@ -403,11 +403,13 @@ long CWelsDecoder::GetOption (DECODER_OPTION eOptID, void* pOption) { · 402 unmodified lines | ||
| 403 | 403 | |
| 404 | 404 | memcpy (pDecoderStatistics, &m_pDecContext->sDecoderStatistics, sizeof (SDecoderStatistics)); |
| 405 | 405 | |
| 406 | − pDecoderStatistics->fAverageFrameSpeedInMs = (float) (m_pDecContext->dDecTime) / | |
| 407 | − (m_pDecContext->sDecoderStatistics.uiDecodedFrameCount); | |
| 408 | − pDecoderStatistics->fActualAverageFrameSpeedInMs = (float) (m_pDecContext->dDecTime) / | |
| 409 | − (m_pDecContext->sDecoderStatistics.uiDecodedFrameCount + m_pDecContext->sDecoderStatistics.uiFreezingIDRNum + | |
| 410 | − m_pDecContext->sDecoderStatistics.uiFreezingNonIDRNum); | |
| 406 | + if (m_pDecContext->sDecoderStatistics.uiDecodedFrameCount != 0) { //not original status | |
| 407 | + pDecoderStatistics->fAverageFrameSpeedInMs = (float) (m_pDecContext->dDecTime) / | |
| 408 | + (m_pDecContext->sDecoderStatistics.uiDecodedFrameCount); | |
| 409 | + pDecoderStatistics->fActualAverageFrameSpeedInMs = (float) (m_pDecContext->dDecTime) / | |
| 410 | + (m_pDecContext->sDecoderStatistics.uiDecodedFrameCount + m_pDecContext->sDecoderStatistics.uiFreezingIDRNum + | |
| 411 | + m_pDecContext->sDecoderStatistics.uiFreezingNonIDRNum); | |
| 412 | + } | |
| 411 | 413 | return cmResultSuccess; |
| 412 | 414 | } |
| 413 | 415 | |