Free motion vector array before re-allocating

Change-Id: I0c39136d67e1e83020d61f86b062a04182ec9b00
This commit is contained in:
Adrian Grange 2014-12-01 16:05:22 -08:00 committed by Gerrit Code Review
parent 73caef0500
commit 979ee6e4c9

View File

@ -2476,6 +2476,7 @@ void vp9_scale_references(VP9_COMP *cpi) {
if (cm->frame_bufs[new_fb].mvs == NULL ||
cm->frame_bufs[new_fb].mi_rows < cm->mi_rows ||
cm->frame_bufs[new_fb].mi_cols < cm->mi_cols) {
vpx_free(cm->frame_bufs[new_fb].mvs);
cm->frame_bufs[new_fb].mvs =
(MV_REF *)vpx_calloc(cm->mi_rows * cm->mi_cols,
sizeof(*cm->frame_bufs[new_fb].mvs));