Showing the changes to codec/decoder/core/src/decoder.cpp (1 of 7 files). Show all
Unified · Split
| @@ -145,6 +145,9 @@ void WelsDecoderDefaults (PWelsDecoderContext pCtx, SLogContext* pLogCtx) { · 144 unmodified lines | ||
| 145 | 145 | |
| 146 | 146 | pCtx->iImgWidthInPixel = 0; |
| 147 | 147 | pCtx->iImgHeightInPixel = 0; // alloc picture data when picture size is available |
| 148 | + pCtx->iLastImgWidthInPixel = 0; | |
| 149 | + pCtx->iLastImgHeightInPixel = 0; | |
| 150 | + pCtx->bFreezeOutput = false; | |
| 148 | 151 | |
| 149 | 152 | pCtx->iFrameNum = -1; |
| 150 | 153 | pCtx->iPrevFrameNum = -1; |
| @@ -160,7 +163,7 @@ void WelsDecoderDefaults (PWelsDecoderContext pCtx, SLogContext* pLogCtx) { · 9 unmodified lines | ||
| 160 | 163 | pCtx->pPicBuff[LIST_1] = NULL; |
| 161 | 164 | |
| 162 | 165 | pCtx->bAvcBasedFlag = true; |
| 163 | − pCtx->eErrorConMethod = ERROR_CON_SLICE_COPY_CROSS_IDR; | |
| 166 | + pCtx->eErrorConMethod = ERROR_CON_SLICE_COPY_CROSS_IDR_FREEZE_RES_CHANGE; | |
| 164 | 167 | pCtx->pPreviousDecodedPictureInDpb = NULL; |
| 165 | 168 | |
| 166 | 169 | } |
| @@ -270,6 +273,9 @@ void WelsFreeMem (PWelsDecoderContext pCtx) { · 103 unmodified lines | ||
| 270 | 273 | // added for safe memory |
| 271 | 274 | pCtx->iImgWidthInPixel = 0; |
| 272 | 275 | pCtx->iImgHeightInPixel = 0; |
| 276 | + pCtx->iLastImgWidthInPixel = 0; | |
| 277 | + pCtx->iLastImgHeightInPixel = 0; | |
| 278 | + pCtx->bFreezeOutput = false; | |
| 273 | 279 | pCtx->bHaveGotMemory = false; |
| 274 | 280 | WelsFree (pCtx->pCabacDecEngine, "pCtx->pCabacDecEngine"); |
| 275 | 281 | } |