amlhwdmx: CB1 deal with profile 20 [1/1]
PD#SWPL-195295
Problem:
For profiles other than profile 20, dv_version_major must be set to 1.
For profile 20, this value must be set to 3.
Solution:
refine check
Verify:
t5w
Change-Id: I854320180053cf3bf7ee8b478b338bff929ac326
Signed-off-by: hanghang.luo <hanghang.luo@amlogic.com>
diff --git a/aml-qtdemux/aml-qtdemux.c b/aml-qtdemux/aml-qtdemux.c
index e7e2759..9ba6fb9 100644
--- a/aml-qtdemux/aml-qtdemux.c
+++ b/aml-qtdemux/aml-qtdemux.c
@@ -11058,14 +11058,7 @@
len = AML_QT_UINT32 (data);
config_data = data + 0x8;
-
- if (((1<<30) < len) || (1 != config_data[0]) || (0 != config_data[1]))
- {
- return 0;
- }
-
buf = (config_data[2] << 8) | config_data[3];
-
profile = (buf >> 9) & 0x7f; // 7 bits
level = (buf >> 3) & 0x3f; // 6 bits
rpu_present_flag = (buf >> 2) & 0x01; // 1 bit
@@ -11073,6 +11066,14 @@
bl_present_flag = buf & 0x01; // 1 bit
bl_signal_compatibility_id = (config_data[4] >> 4) & 0x0f; // 4 bit
+ if (((1<<30) < len)
+ || !((20 == profile && 3 == config_data[0])|| (20 != profile && 1 == config_data[0]))
+ || (0 != config_data[1]))
+ {
+ GST_DEBUG ("len: %d profile: %d config_data[0]): %d config_data[1]): %d", len, profile, config_data[0], config_data[1]);
+ return 0;
+ }
+
GST_DEBUG ("entry type: %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (sampleEntry));
GST_DEBUG ("dvConfig type: %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (dvConfig));
GST_DEBUG ("profile: %d, level: %d, rpu_flag: %d, el_present_flag: %d, bl_present_flag: %d, compatibility_id: %d",