Moves error concealment allocations from common parts to decoder
The backup MODE_INFO buffer used in the error concealment was allocated in the codec common parts allocation even though this is a decoder only resource. Moved the allocation to the decoder side. No need to update_mode_info_border as mode_info buffers are zero allocated. This fixes also a potential memory leak as the EC overlaps buffer was not properly released before reallocation after a frame size change. Change-Id: I12803d3e012308d95669069980b1c95973fb775f
This commit is contained in:
@@ -51,12 +51,13 @@ int vp8_alloc_overlap_lists(VP8D_COMP *pbi)
|
||||
vpx_free(pbi->overlaps);
|
||||
pbi->overlaps = NULL;
|
||||
}
|
||||
|
||||
pbi->overlaps = vpx_calloc(pbi->common.mb_rows * pbi->common.mb_cols,
|
||||
sizeof(MB_OVERLAP));
|
||||
|
||||
if (pbi->overlaps == NULL)
|
||||
return -1;
|
||||
vpx_memset(pbi->overlaps, 0,
|
||||
sizeof(MB_OVERLAP) * pbi->common.mb_rows * pbi->common.mb_cols);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user