Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 10 files). Show all
Unified · Split
| @@ -412,8 +412,9 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, · 411 unmodified lines | |||
| 412 | ppDst[0] = ppDst[1] = ppDst[2] = NULL; | 412 | ppDst[0] = ppDst[1] = ppDst[2] = NULL; |
| 413 | m_pDecContext->iErrorCode = dsErrorFree; //initialize at the starting of AU decoding. | 413 | m_pDecContext->iErrorCode = dsErrorFree; //initialize at the starting of AU decoding. |
| 414 | m_pDecContext->iFeedbackVclNalInAu = FEEDBACK_UNKNOWN_NAL; //initialize | 414 | m_pDecContext->iFeedbackVclNalInAu = FEEDBACK_UNKNOWN_NAL; //initialize |
| 415 | unsigned long long uiInBsTimeStamp = pDstInfo->uiInBsTimeStamp; | ||
| 415 | memset (pDstInfo, 0, sizeof (SBufferInfo)); | 416 | memset (pDstInfo, 0, sizeof (SBufferInfo)); |
| 416 | 417 | pDstInfo->uiInBsTimeStamp = uiInBsTimeStamp; | |
| 417 | #ifdef LONG_TERM_REF | 418 | #ifdef LONG_TERM_REF |
| 418 | m_pDecContext->bReferenceLostAtT0Flag = false; //initialize for LTR | 419 | m_pDecContext->bReferenceLostAtT0Flag = false; //initialize for LTR |
| 419 | m_pDecContext->bCurAuContainLtrMarkSeFlag = false; | 420 | m_pDecContext->bCurAuContainLtrMarkSeFlag = false; |
| @@ -422,7 +423,12 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, · 2 unmodified lines | |||
| 422 | #endif | 423 | #endif |
| 423 | 424 | ||
| 424 | m_pDecContext->iFeedbackTidInAu = -1; //initialize | 425 | m_pDecContext->iFeedbackTidInAu = -1; //initialize |
| 425 | 426 | if (pDstInfo) { | |
| 427 | pDstInfo->uiOutYuvTimeStamp = 0; | ||
| 428 | m_pDecContext->uiTimeStamp = pDstInfo->uiInBsTimeStamp; | ||
| 429 | } else { | ||
| 430 | m_pDecContext->uiTimeStamp = 0; | ||
| 431 | } | ||
| 426 | WelsDecodeBs (m_pDecContext, kpSrc, kiSrcLen, ppDst, | 432 | WelsDecodeBs (m_pDecContext, kpSrc, kiSrcLen, ppDst, |
| 427 | pDstInfo, NULL); //iErrorCode has been modified in this function | 433 | pDstInfo, NULL); //iErrorCode has been modified in this function |
| 428 | m_pDecContext->bInstantDecFlag = false; //reset no-delay flag | 434 | m_pDecContext->bInstantDecFlag = false; //reset no-delay flag |
| @@ -524,6 +530,12 @@ DECODING_STATE CWelsDecoder::DecodeParser (const unsigned char* kpSrc, · 95 unmodified lines | |||
| 524 | m_pDecContext->pParserBsInfo = pDstInfo; | 530 | m_pDecContext->pParserBsInfo = pDstInfo; |
| 525 | pDstInfo->iNalNum = 0; | 531 | pDstInfo->iNalNum = 0; |
| 526 | pDstInfo->iSpsWidthInPixel = pDstInfo->iSpsHeightInPixel = 0; | 532 | pDstInfo->iSpsWidthInPixel = pDstInfo->iSpsHeightInPixel = 0; |
| 533 | if(pDstInfo) { | ||
| 534 | m_pDecContext->uiTimeStamp = pDstInfo->uiInBsTimeStamp; | ||
| 535 | pDstInfo->uiOutBsTimeStamp = 0; | ||
| 536 | } else { | ||
| 537 | m_pDecContext->uiTimeStamp = 0; | ||
| 538 | } | ||
| 527 | WelsDecodeBs (m_pDecContext, kpSrc, kiSrcLen, NULL, NULL, pDstInfo); | 539 | WelsDecodeBs (m_pDecContext, kpSrc, kiSrcLen, NULL, NULL, pDstInfo); |
| 528 | 540 | ||
| 529 | return (DECODING_STATE) m_pDecContext->iErrorCode; | 541 | return (DECODING_STATE) m_pDecContext->iErrorCode; |