From aab26b14f6b78a6f2fc8b4f48be9ab4875d50236 Mon Sep 17 00:00:00 2001 From: "shihong.zheng" Date: Mon, 27 Jul 2020 14:45:45 +0800 Subject: [PATCH] amstream: fix null pointer crash in dv frame mode. [1/1] PD#SWPL-30431 Problem: secure dolby vision frame mode crash. Solution: no slave vdec in dolby vision frame mode. so needn't set slave vdec port_flag. Verify: ah212 Change-Id: Ib4010e8d243be0fba773b02b0f6984ea9f9dfb67 Signed-off-by: shihong.zheng --- drivers/stream_input/amports/amstream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/stream_input/amports/amstream.c b/drivers/stream_input/amports/amstream.c index bfb44b4..b204dc6 100644 --- a/drivers/stream_input/amports/amstream.c +++ b/drivers/stream_input/amports/amstream.c @@ -622,7 +622,7 @@ static int video_port_init(struct port_priv_s *priv, pr_err("vformat not set\n"); return -EPERM; } - if (vdec_dual(vdec) && vdec_secure(vdec)) { + if (vdec_dual(vdec) && vdec_secure(vdec) && (vdec->slave)) { /*copy drm flags for slave dec.*/ vdec->slave->port_flag |= PORT_FLAG_DRM; } -- 2.20.1