diff options
author | hkuang <hkuang@google.com> | 2013-11-14 22:50:46 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-11-14 22:50:46 -0800 |
commit | aa43d6ba5f5fb7eaeca1d0573ecb16ea4d388197 (patch) | |
tree | 6ff3bfc5090953c49fa26fac842b924d88e0983d /libvpx/vpx_scale/generic/yv12config.c | |
parent | a1b7a7bb1ccf3f479bbca69a52a76eb05789dbaf (diff) | |
parent | 9b35249446b07f40ac5fcc3205f2c048616efacc (diff) | |
download | android_external_libvpx-aa43d6ba5f5fb7eaeca1d0573ecb16ea4d388197.tar.gz android_external_libvpx-aa43d6ba5f5fb7eaeca1d0573ecb16ea4d388197.tar.bz2 android_external_libvpx-aa43d6ba5f5fb7eaeca1d0573ecb16ea4d388197.zip |
am 9b352494: Roll latest libvpx to fix scalling bug. Checkout is from master:Ib748eb287520c794631697204da6ebe19523ce95
* commit '9b35249446b07f40ac5fcc3205f2c048616efacc':
Roll latest libvpx to fix scalling bug. Checkout is from master:Ib748eb287520c794631697204da6ebe19523ce95
Diffstat (limited to 'libvpx/vpx_scale/generic/yv12config.c')
-rw-r--r-- | libvpx/vpx_scale/generic/yv12config.c | 5 |
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; } |