diff options
| author | 2011-03-22 11:42:08 -0700 | |
|---|---|---|
| committer | 2011-03-22 11:42:08 -0700 | |
| commit | dce4a0f0d5f43ea3862503720fd4561f0c0cd33c (patch) | |
| tree | 5a4cf74ab257f68759b0767dbbeee8fa4b72df0b | |
| parent | 37f421c5947b15dd37b8cba6abb84074a2f26747 (diff) | |
| parent | 6834f0617aea626dfc0f306c9fa3610f32cee1f7 (diff) | |
am 6834f061: am 970d7dd9: am e2c32e9f: If nothing is to be copied, return right away.
* commit '6834f0617aea626dfc0f306c9fa3610f32cee1f7':
If nothing is to be copied, return right away.
| -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 7c65612b3387..3c99d1c715a0 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; |