History

Fix a thread buffering bug: a few yuv frames at output can be dropped due to unexpected pDst reset. This is resolved by moving pDst into SBufferInfo data structure.

xiaotiansf committed 6 years ago

Commit aae33c01 parent cae50c75 files · +25 −25Browse files

Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 5 files). Show all

Unified · Split

codec/decoder/core/src/decoder_core.cpp+3−0
@@ -220,6 +220,9 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 219 unmodified lines
220220 ppDst[0] = ppDst[0] + pCtx->sFrameCrop.iTopOffset * 2 * pPic->iLinesize[0] + pCtx->sFrameCrop.iLeftOffset * 2;
221221 ppDst[1] = ppDst[1] + pCtx->sFrameCrop.iTopOffset * pPic->iLinesize[1] + pCtx->sFrameCrop.iLeftOffset;
222222 ppDst[2] = ppDst[2] + pCtx->sFrameCrop.iTopOffset * pPic->iLinesize[1] + pCtx->sFrameCrop.iLeftOffset;
223+ for (int i = 0; i < 3; ++i) {
224+ pDstInfo->pDst[i] = ppDst[i];
225+ }
223226 pDstInfo->iBufferStatus = 1;
224227 if (GetThreadCount (pCtx) > 1 && pPic->bIsComplete == false) {
225228 pPic->bIsComplete = true;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t