summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/NuCachedSource2.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-06-11 09:22:48 -0700
committerAndreas Huber <andih@google.com>2010-06-11 09:22:48 -0700
commit6f5aae1bcba130d5b8092a19fca3627aa565df56 (patch)
tree9c374a2bfe07516f509271a33e5efb9269547f8d /media/libstagefright/NuCachedSource2.cpp
parentddbdb35d176266b5ab64c30178f5cb76c5b1b4b4 (diff)
downloadframeworks_av-6f5aae1bcba130d5b8092a19fca3627aa565df56.zip
frameworks_av-6f5aae1bcba130d5b8092a19fca3627aa565df56.tar.gz
frameworks_av-6f5aae1bcba130d5b8092a19fca3627aa565df56.tar.bz2
Fix a typo in NuCachedSource2 that would trigger an assert near the end of a stream.
Change-Id: I963ad7074b830d553b67c8925efd5369d0b7a5b9
Diffstat (limited to 'media/libstagefright/NuCachedSource2.cpp')
-rw-r--r--media/libstagefright/NuCachedSource2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/libstagefright/NuCachedSource2.cpp b/media/libstagefright/NuCachedSource2.cpp
index 63ba000..6727c73 100644
--- a/media/libstagefright/NuCachedSource2.cpp
+++ b/media/libstagefright/NuCachedSource2.cpp
@@ -416,7 +416,7 @@ ssize_t NuCachedSource2::readInternal(off_t offset, void *data, size_t size) {
return mFinalStatus;
}
- size_t avail = mCache->totalSize() - offset;
+ size_t avail = mCache->totalSize() - delta;
mCache->copy(delta, data, avail);
return avail;