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 | 412 | ppDst[0] = ppDst[1] = ppDst[2] = NULL; |
| 413 | 413 | m_pDecContext->iErrorCode = dsErrorFree; //initialize at the starting of AU decoding. |
| 414 | 414 | m_pDecContext->iFeedbackVclNalInAu = FEEDBACK_UNKNOWN_NAL; //initialize |
| 415 | + unsigned long long uiInBsTimeStamp = pDstInfo->uiInBsTimeStamp; | |
| 415 | 416 | memset (pDstInfo, 0, sizeof (SBufferInfo)); |
| 416 | − | |
| 417 | + pDstInfo->uiInBsTimeStamp = uiInBsTimeStamp; | |
| 417 | 418 | #ifdef LONG_TERM_REF |
| 418 | 419 | m_pDecContext->bReferenceLostAtT0Flag = false; //initialize for LTR |
| 419 | 420 | m_pDecContext->bCurAuContainLtrMarkSeFlag = false; |
| @@ -422,7 +423,12 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, · 2 unmodified lines | ||
| 422 | 423 | #endif |
| 423 | 424 | |
| 424 | 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 | 432 | WelsDecodeBs (m_pDecContext, kpSrc, kiSrcLen, ppDst, |
| 427 | 433 | pDstInfo, NULL); //iErrorCode has been modified in this function |
| 428 | 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 | 530 | m_pDecContext->pParserBsInfo = pDstInfo; |
| 525 | 531 | pDstInfo->iNalNum = 0; |
| 526 | 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 | 539 | WelsDecodeBs (m_pDecContext, kpSrc, kiSrcLen, NULL, NULL, pDstInfo); |
| 528 | 540 | |
| 529 | 541 | return (DECODING_STATE) m_pDecContext->iErrorCode; |