summaryrefslogtreecommitdiffstats
path: root/libvpx/vpx_scale/generic/yv12config.c
diff options
context:
space:
mode:
authorhkuang <hkuang@google.com>2013-11-14 16:48:58 -0800
committerhkuang <hkuang@google.com>2013-11-14 16:48:58 -0800
commit9b35249446b07f40ac5fcc3205f2c048616efacc (patch)
treefe2ffa7c55b8d1f84a3e97e7fd68a0d484d669dc /libvpx/vpx_scale/generic/yv12config.c
parent5ae7ac49f08a179e4f054d99fcfc9dce78d26e58 (diff)
downloadandroid_external_libvpx-9b35249446b07f40ac5fcc3205f2c048616efacc.tar.gz
android_external_libvpx-9b35249446b07f40ac5fcc3205f2c048616efacc.tar.bz2
android_external_libvpx-9b35249446b07f40ac5fcc3205f2c048616efacc.zip
Roll latest libvpx to fix scalling bug.
Checkout is from master:Ib748eb287520c794631697204da6ebe19523ce95 Bug: 11690668 Change-Id: Ia2bde2e50feca81556563ad3797e4972748e2041
Diffstat (limited to 'libvpx/vpx_scale/generic/yv12config.c')
-rw-r--r--libvpx/vpx_scale/generic/yv12config.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libvpx/vpx_scale/generic/yv12config.c b/libvpx/vpx_scale/generic/yv12config.c
index a89e29d..7c3f7ec 100644
--- a/libvpx/vpx_scale/generic/yv12config.c
+++ b/libvpx/vpx_scale/generic/yv12config.c
@@ -148,7 +148,10 @@ int vp9_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf,
#else
const int frame_size = yplane_size + 2 * uvplane_size;
#endif
- if (!ybf->buffer_alloc) {
+ if (frame_size > ybf->buffer_alloc_sz) {
+ // Allocation to hold larger frame, or first allocation.
+ if (ybf->buffer_alloc)
+ vpx_free(ybf->buffer_alloc);
ybf->buffer_alloc = vpx_memalign(32, frame_size);
ybf->buffer_alloc_sz = frame_size;
}