summaryrefslogtreecommitdiff
authorYao.Liu <yao.liu@amlogic.com>2017-12-05 02:21:23 (GMT)
committer Yao.Liu <yao.liu@amlogic.com>2017-12-05 06:54:58 (GMT)
commitc01fd6a29b4ac31c5484440809d0726a9651fde2 (patch)
treefb7b2a04ec3458cfcb5f5f8ec8c4a63077f7d61e
parent6391df031abe4909fb886fb5ed844c7743277b92 (diff)
downloadhwcomposer-c01fd6a29b4ac31c5484440809d0726a9651fde2.zip
hwcomposer-c01fd6a29b4ac31c5484440809d0726a9651fde2.tar.gz
hwcomposer-c01fd6a29b4ac31c5484440809d0726a9651fde2.tar.bz2
hwc2: setvideodisable to 1 to free last video frame
PD#156059 PD#156062 Some apps close video surfaceview before decoding finished, last few video frames will continue to display if videodisable=2 Change-Id: I200c3aea25da3eb55eabe4ce00591cac3d6defe8 Signed-off-by: Yao.Liu <yao.liu@amlogic.com>
Diffstat
-rw-r--r--hwc2/common/devices/PhysicalDevice.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/hwc2/common/devices/PhysicalDevice.cpp b/hwc2/common/devices/PhysicalDevice.cpp
index bc75be2..338b83a 100644
--- a/hwc2/common/devices/PhysicalDevice.cpp
+++ b/hwc2/common/devices/PhysicalDevice.cpp
@@ -1432,10 +1432,10 @@ int32_t PhysicalDevice::validateDisplay(uint32_t* outNumTypes,
} else {
//disable video layer.
if (mVideoLayerOpenByOMX) {
- if (is_disable_video == 0) {
+ if (is_disable_video == 0 || is_disable_video == 2) {
if (mVideoOverlayLayerId == 0) {
- ALOGI("no omx video layer, no OVERLAY, set display_mode 2");
- AmVideo::getInstance()->setvideodisable(2);
+ ALOGI("no omx video layer, no OVERLAY, set display_mode %d->1",is_disable_video);
+ AmVideo::getInstance()->setvideodisable(1);
} else {
ALOGI("no omx video layer, but has OVERLAY, not set display_mode");
}