summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Desaulniers <ndesaulniers@google.com>2019-11-12 10:04:37 -0800
committerandroid-build-merger <android-build-merger@google.com>2019-11-12 10:04:37 -0800
commita13b547c8a149f0c192413c8ac2bfb30a050702f (patch)
tree9dce4dace270c88bae55dac915bba5ff8fc0c92e
parent48245a06853f76c89937ab7e5ddabac2bf26fec8 (diff)
parentd28d2efed584852b71ab7595639b06417ea3ea3f (diff)
downloadav-a13b547c8a149f0c192413c8ac2bfb30a050702f.tar.gz
hardware: google: av: media: fix -Wdangling-gsl am: b5f4c2ab97 am: dc98ac543c
am: d28d2efed5 Change-Id: Id0aca1a70d783807a538f7947c45f61d9f4b9a30
-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 9ec08f2..455232c 100644
--- a/media/sfplugin/CCodecBufferChannel.cpp
+++ b/media/sfplugin/CCodecBufferChannel.cpp
@@ -1163,9 +1163,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;
}