diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2012-08-08 13:08:15 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-08-08 13:08:15 -0700 |
commit | 44237a8d58dc218257687f2cbe8fd33d73a713e8 (patch) | |
tree | adb18ef017ae629be478eee1e3eff62aa51547e2 /media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp | |
parent | 68d44b061e92fb6832240457d4f683635bf5328f (diff) | |
parent | b71298eeeb16d942dd5144e550731e6e29b6436e (diff) | |
download | frameworks_av-44237a8d58dc218257687f2cbe8fd33d73a713e8.zip frameworks_av-44237a8d58dc218257687f2cbe8fd33d73a713e8.tar.gz frameworks_av-44237a8d58dc218257687f2cbe8fd33d73a713e8.tar.bz2 |
am b71298ee: Merge "avcenc: Initialize all memory allocated by the CBAVC_Malloc callback function"
* commit 'b71298eeeb16d942dd5144e550731e6e29b6436e':
avcenc: Initialize all memory allocated by the CBAVC_Malloc callback function
Diffstat (limited to 'media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp')
-rw-r--r-- | media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp index 9fedace..259562b 100644 --- a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp +++ b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp @@ -133,7 +133,10 @@ inline static void ConvertYUV420SemiPlanarToYUV420Planar( static void* MallocWrapper( void *userData, int32_t size, int32_t attrs) { - return malloc(size); + void *ptr = malloc(size); + if (ptr) + memset(ptr, 0, size); + return ptr; } static void FreeWrapper(void *userData, void* ptr) { |