Showing the changes to codec/decoder/core/src/decoder.cpp (1 of 6 files). Show all
Unified · Split
| @@ -160,7 +160,7 @@ void WelsDecoderDefaults (PWelsDecoderContext pCtx, SLogContext* pLogCtx) { · 159 unmodified lines | |||
| 160 | pCtx->pPicBuff[LIST_1] = NULL; | 160 | pCtx->pPicBuff[LIST_1] = NULL; |
| 161 | 161 | ||
| 162 | pCtx->bAvcBasedFlag = true; | 162 | pCtx->bAvcBasedFlag = true; |
| 163 | pCtx->eErrorConMethod = ERROR_CON_SLICE_COPY; | 163 | pCtx->eErrorConMethod = ERROR_CON_SLICE_COPY_CROSS_IDR; |
| 164 | pCtx->pPreviousDecodedPictureInDpb = NULL; | 164 | pCtx->pPreviousDecodedPictureInDpb = NULL; |
| 165 | 165 | ||
| 166 | } | 166 | } |
| @@ -468,7 +468,8 @@ int32_t WelsDecodeBs (PWelsDecoderContext pCtx, const uint8_t* kpBsBuf, const in · 301 unmodified lines | |||
| 468 | } else { | 468 | } else { |
| 469 | 469 | ||
| 470 | iConsumedBytes = 0; | 470 | iConsumedBytes = 0; |
| 471 | pDstNal[iDstIdx] = pDstNal[iDstIdx + 1] = pDstNal[iDstIdx + 2] = pDstNal[iDstIdx + 3] = 0; // set 4 reserved bytes to zero | 471 | pDstNal[iDstIdx] = pDstNal[iDstIdx + 1] = pDstNal[iDstIdx + 2] = pDstNal[iDstIdx + 3] = |
| 472 | 0; // set 4 reserved bytes to zero | ||
| 472 | pNalPayload = ParseNalHeader (pCtx, &pCtx->sCurNalHead, pDstNal, iDstIdx, pSrcNal - 3, iSrcIdx + 3, &iConsumedBytes); | 473 | pNalPayload = ParseNalHeader (pCtx, &pCtx->sCurNalHead, pDstNal, iDstIdx, pSrcNal - 3, iSrcIdx + 3, &iConsumedBytes); |
| 473 | if (IS_VCL_NAL (pCtx->sCurNalHead.eNalUnitType, 1)) { | 474 | if (IS_VCL_NAL (pCtx->sCurNalHead.eNalUnitType, 1)) { |
| 474 | CheckAndFinishLastPic (pCtx, ppDst, pDstBufInfo); | 475 | CheckAndFinishLastPic (pCtx, ppDst, pDstBufInfo); |
| @@ -528,7 +529,8 @@ int32_t WelsDecodeBs (PWelsDecoderContext pCtx, const uint8_t* kpBsBuf, const in · 53 unmodified lines | |||
| 528 | //last NAL decoding | 529 | //last NAL decoding |
| 529 | 530 | ||
| 530 | iConsumedBytes = 0; | 531 | iConsumedBytes = 0; |
| 531 | pDstNal[iDstIdx] = pDstNal[iDstIdx + 1] = pDstNal[iDstIdx + 2] = pDstNal[iDstIdx + 3] = 0; // set 4 reserved bytes to zero | 532 | pDstNal[iDstIdx] = pDstNal[iDstIdx + 1] = pDstNal[iDstIdx + 2] = pDstNal[iDstIdx + 3] = |
| 533 | 0; // set 4 reserved bytes to zero | ||
| 532 | pNalPayload = ParseNalHeader (pCtx, &pCtx->sCurNalHead, pDstNal, iDstIdx, pSrcNal - 3, iSrcIdx + 3, &iConsumedBytes); | 534 | pNalPayload = ParseNalHeader (pCtx, &pCtx->sCurNalHead, pDstNal, iDstIdx, pSrcNal - 3, iSrcIdx + 3, &iConsumedBytes); |
| 533 | if (IS_VCL_NAL (pCtx->sCurNalHead.eNalUnitType, 1)) { | 535 | if (IS_VCL_NAL (pCtx->sCurNalHead.eNalUnitType, 1)) { |
| 534 | CheckAndFinishLastPic (pCtx, ppDst, pDstBufInfo); | 536 | CheckAndFinishLastPic (pCtx, ppDst, pDstBufInfo); |