shithub: libvpx

Download patch

ref: 50b38cf1aa753f0c406b249d8e78a0689572d69b
parent: 6b02a123bc0025c85d5ba110848f65f1e9fb2442
author: Wan-Teh Chang <wtc@google.com>
date: Mon Jan 14 06:54:59 EST 2019

Reset buffer_alloc_sz after freeing buffer_alloc.

ybf->buffer_alloc and ybf->buffer_alloc_sz should ideally be kept in
sync. If ybf->buffer_alloc is reset to NULL after being freed, then
ybf->buffer_alloc_sz should be reset to 0.

Change-Id: I7e7566b563ddf145d0e46050c5b6bd141084f8b3

--- a/vpx_scale/generic/yv12config.c
+++ b/vpx_scale/generic/yv12config.c
@@ -228,6 +228,7 @@
       // Allocation to hold larger frame, or first allocation.
       vpx_free(ybf->buffer_alloc);
       ybf->buffer_alloc = NULL;
+      ybf->buffer_alloc_sz = 0;
 
       ybf->buffer_alloc = (uint8_t *)vpx_memalign(32, (size_t)frame_size);
       if (!ybf->buffer_alloc) return -1;