diff options
author | Andreas Huber <andih@google.com> | 2011-03-21 16:21:29 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-03-21 16:21:29 -0700 |
commit | 970d7dd95f704fb068c8add784f5b8c1c17ebd3c (patch) | |
tree | e27458003fa05df25573a20f8a62109a4bcde292 /media | |
parent | f82e5a2c903d16b6ca35313e184462625d482ff1 (diff) | |
parent | e2c32e9f966cf9f2c9ed94bf0703344a2cca284b (diff) | |
download | frameworks_base-970d7dd95f704fb068c8add784f5b8c1c17ebd3c.zip frameworks_base-970d7dd95f704fb068c8add784f5b8c1c17ebd3c.tar.gz frameworks_base-970d7dd95f704fb068c8add784f5b8c1c17ebd3c.tar.bz2 |
am e2c32e9f: If nothing is to be copied, return right away.
* commit 'e2c32e9f966cf9f2c9ed94bf0703344a2cca284b':
If nothing is to be copied, return right away.
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/NuCachedSource2.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/media/libstagefright/NuCachedSource2.cpp b/media/libstagefright/NuCachedSource2.cpp index c7b99b9..248b678 100644 --- a/media/libstagefright/NuCachedSource2.cpp +++ b/media/libstagefright/NuCachedSource2.cpp @@ -135,6 +135,10 @@ size_t PageCache::releaseFromStart(size_t maxBytes) { void PageCache::copy(size_t from, void *data, size_t size) { LOGV("copy from %d size %d", from, size); + if (size == 0) { + return; + } + CHECK_LE(from + size, mTotalSize); size_t offset = 0; |