diff options
author | Leena Winterrowd <lenhardw@codeaurora.org> | 2015-01-29 08:41:26 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-01-29 08:41:26 +0000 |
commit | 00dfe8432618c1d512557b2ed5910c44fc293948 (patch) | |
tree | d166d391e8112b200a983d869849e44d869b5b1d /media/libstagefright/httplive | |
parent | 46246e5b1725a8a1868dbd9f37fffe33c19672fc (diff) | |
parent | 0512881b08d03d10d6f164566c9a787d2f56ab6d (diff) | |
download | frameworks_av-00dfe8432618c1d512557b2ed5910c44fc293948.zip frameworks_av-00dfe8432618c1d512557b2ed5910c44fc293948.tar.gz frameworks_av-00dfe8432618c1d512557b2ed5910c44fc293948.tar.bz2 |
am 0512881b: am 9aff25fb: stagefright: httplive: Reduce memcpy calls for chunked content
* commit '0512881b08d03d10d6f164566c9a787d2f56ab6d':
stagefright: httplive: Reduce memcpy calls for chunked content
Diffstat (limited to 'media/libstagefright/httplive')
-rw-r--r-- | media/libstagefright/httplive/LiveSession.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/media/libstagefright/httplive/LiveSession.cpp b/media/libstagefright/httplive/LiveSession.cpp index 4369ac3..c906aa8 100644 --- a/media/libstagefright/httplive/LiveSession.cpp +++ b/media/libstagefright/httplive/LiveSession.cpp @@ -872,7 +872,11 @@ ssize_t LiveSession::fetchFile( // Only resize when we don't know the size. size_t bufferRemaining = buffer->capacity() - buffer->size(); if (bufferRemaining == 0 && getSizeErr != OK) { - bufferRemaining = 32768; + size_t bufferIncrement = buffer->size() / 2; + if (bufferIncrement < 32768) { + bufferIncrement = 32768; + } + bufferRemaining = bufferIncrement; ALOGV("increasing download buffer to %zu bytes", buffer->size() + bufferRemaining); |