Snap for 10476824 from 3da570666e387ed69d761540aefe840cae4b6cce to mainline-tethering-release
Change-Id: I9a381a20ee444c83287313303a53ef04736db0d8
diff --git a/media/codec2/sfplugin/utils/Codec2CommonUtils.cpp b/media/codec2/sfplugin/utils/Codec2CommonUtils.cpp
index bb6c1b8..f428fce 100644
--- a/media/codec2/sfplugin/utils/Codec2CommonUtils.cpp
+++ b/media/codec2/sfplugin/utils/Codec2CommonUtils.cpp
@@ -83,7 +83,7 @@
}
// Default scenario --- the consumer is display or GPU
- const AHardwareBuffer_Desc desc = {
+ const AHardwareBuffer_Desc consumableForDisplayOrGpu = {
.width = 320,
.height = 240,
.format = format,
@@ -98,7 +98,7 @@
};
// The consumer is a HW encoder
- const AHardwareBuffer_Desc descHwEncoder = {
+ const AHardwareBuffer_Desc consumableForHwEncoder = {
.width = 320,
.height = 240,
.format = format,
@@ -114,7 +114,7 @@
};
// The consumer is a SW encoder
- const AHardwareBuffer_Desc descSwEncoder = {
+ const AHardwareBuffer_Desc consumableForSwEncoder = {
.width = 320,
.height = 240,
.format = format,
@@ -128,9 +128,9 @@
.rfu1 = 0,
};
- return AHardwareBuffer_isSupported(&desc)
- && AHardwareBuffer_isSupported(&descHwEncoder)
- && AHardwareBuffer_isSupported(&descSwEncoder);
+ return AHardwareBuffer_isSupported(&consumableForDisplayOrGpu)
+ && AHardwareBuffer_isSupported(&consumableForHwEncoder)
+ && AHardwareBuffer_isSupported(&consumableForSwEncoder);
}
} // namespace android
diff --git a/media/mtp/MtpProperty.h b/media/mtp/MtpProperty.h
index 36d7360..2bdbfd3 100644
--- a/media/mtp/MtpProperty.h
+++ b/media/mtp/MtpProperty.h
@@ -26,6 +26,9 @@
class MtpDataPacket;
struct MtpPropertyValue {
+ // pointer str initialized to NULL so that free operation
+ // is not called for pre-assigned value
+ MtpPropertyValue() : str (NULL) {}
union {
int8_t i8;
uint8_t u8;