Showing the changes to codec/decoder/core/src/decoder.cpp (1 of 2 files). Show all
Unified · Split
| @@ -826,7 +826,8 @@ int32_t SyncPictureResolutionExt (PWelsDecoderContext pCtx, const int32_t kiMbWi · 825 unmodified lines | |||
| 826 | const int32_t kiPicWidth = kiMbWidth << 4; | 826 | const int32_t kiPicWidth = kiMbWidth << 4; |
| 827 | const int32_t kiPicHeight = kiMbHeight << 4; | 827 | const int32_t kiPicHeight = kiMbHeight << 4; |
| 828 | //fix Bugzilla Bug1479656 reallocate temp dec picture | 828 | //fix Bugzilla Bug1479656 reallocate temp dec picture |
| 829 | if (pCtx->pTempDec != NULL) { | 829 | if (pCtx->pTempDec != NULL && (pCtx->pTempDec->iWidthInPixel != kiPicWidth |
| 830 | || pCtx->pTempDec->iHeightInPixel != kiPicHeight)) { | ||
| 830 | FreePicture (pCtx->pTempDec, pCtx->pMemAlign); | 831 | FreePicture (pCtx->pTempDec, pCtx->pMemAlign); |
| 831 | pCtx->pTempDec = AllocPicture (pCtx, pCtx->pSps->iMbWidth << 4, pCtx->pSps->iMbHeight << 4); | 832 | pCtx->pTempDec = AllocPicture (pCtx, pCtx->pSps->iMbWidth << 4, pCtx->pSps->iMbHeight << 4); |
| 832 | } | 833 | } |