shithub: libvpx

Download patch

ref: 979ee6e4c994e851988d2625d5c93532e8168129
parent: 73caef05006d71f13b6866fa506ab6c7f146f0d8
author: Adrian Grange <agrange@google.com>
date: Mon Dec 1 11:05:22 EST 2014

Free motion vector array before re-allocating

Change-Id: I0c39136d67e1e83020d61f86b062a04182ec9b00

--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -2476,6 +2476,7 @@
         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));