summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--media/libstagefright/NuCachedSource2.cpp4
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;