gst-aml-drm-plugins: CB1 av1 caps lack framerate [1/1]
PD#SWPL-133960
Problem:
av1_sec_trans drops framerate caps.
Solution:
add framerate caps in av1_sec_trans.
Verify:
Yocto T5W
Signed-off-by: le.han <le.han@amlogic.com>
Change-Id: I75534a5c16c9d9c47ec2a7a751fa41bd6f68f17f
diff --git a/gst-aml-drm-plugins-1.0/src/secure_parse/gstav1_sec_trans.c b/gst-aml-drm-plugins-1.0/src/secure_parse/gstav1_sec_trans.c
index ca4712f..b7d918b 100644
--- a/gst-aml-drm-plugins-1.0/src/secure_parse/gstav1_sec_trans.c
+++ b/gst-aml-drm-plugins-1.0/src/secure_parse/gstav1_sec_trans.c
@@ -131,7 +131,7 @@
case GST_PAD_SINK:
{
if (gst_caps_can_intersect(caps, sinkcaps)) {
- gint width, height;
+ gint width, height, num, denom;
GstStructure *s = gst_structure_copy(gst_caps_get_structure (caps, 0));
ret = gst_caps_copy(srccaps);
@@ -151,6 +151,12 @@
}
gst_caps_set_simple (ret, "height", G_TYPE_INT, height, NULL);
}
+ if (s) {
+ if (gst_structure_has_field (s, "framerate")) {
+ gst_structure_get_fraction( s, "framerate", &num, &denom );
+ gst_caps_set_simple (ret, "framerate", GST_TYPE_FRACTION, num, denom, NULL);
+ }
+ }
}
unsigned size = gst_caps_get_size(ret);
for (unsigned i = 0; i < size; ++i) {