summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Desaulniers <ndesaulniers@google.com>2019-11-12 09:56:06 -0800
committerandroid-build-merger <android-build-merger@google.com>2019-11-12 09:56:06 -0800
commitd28d2efed584852b71ab7595639b06417ea3ea3f (patch)
treed4a28cad75e53291df454efe93333ee0c83b20c9
parent68c111adfa91596fb758d5c49a0e6bb9337f7bea (diff)
parentdc98ac543c9e3f120a3aacdc8b39d0b614451792 (diff)
downloadav-d28d2efed584852b71ab7595639b06417ea3ea3f.tar.gz
hardware: google: av: media: fix -Wdangling-gsl am: b5f4c2ab97
am: dc98ac543c Change-Id: I662b83dc9ec7e086ec746dbdb128bc5004922fbe
-rw-r--r--media/sfplugin/CCodecBufferChannel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/media/sfplugin/CCodecBufferChannel.cpp b/media/sfplugin/CCodecBufferChannel.cpp
index 247eb9b..d4b08c1 100644
--- a/media/sfplugin/CCodecBufferChannel.cpp
+++ b/media/sfplugin/CCodecBufferChannel.cpp
@@ -1162,9 +1162,9 @@ public:
switch (c2buffer->data().type()) {
case C2BufferData::LINEAR: {
uint32_t size = kLinearBufferSize;
- const C2ConstLinearBlock &block = c2buffer->data().linearBlocks().front();
- if (block.size() < kMaxLinearBufferSize / 2) {
- size = block.size() * 2;
+ const size_t blockSize = c2buffer->data().linearBlocks().front().size();
+ if (blockSize < kMaxLinearBufferSize / 2) {
+ size = blockSize * 2;
} else {
size = kMaxLinearBufferSize;
}