diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2012-08-08 13:11:18 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-08-08 13:11:18 -0700 |
commit | 49e74946370e7af2378e28733ba6d8df8951b068 (patch) | |
tree | ad58044e45949e2b1283beeb3dbc580b677f1d28 /media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp | |
parent | f5a66877655695af619909db6c831f78373d733e (diff) | |
parent | 44237a8d58dc218257687f2cbe8fd33d73a713e8 (diff) | |
download | frameworks_av-49e74946370e7af2378e28733ba6d8df8951b068.zip frameworks_av-49e74946370e7af2378e28733ba6d8df8951b068.tar.gz frameworks_av-49e74946370e7af2378e28733ba6d8df8951b068.tar.bz2 |
am 44237a8d: am b71298ee: Merge "avcenc: Initialize all memory allocated by the CBAVC_Malloc callback function"
* commit '44237a8d58dc218257687f2cbe8fd33d73a713e8':
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 b6cd6bb..a2ef3a1 100644 --- a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp +++ b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp @@ -137,7 +137,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) { |