gst-plugin-video-sink: CB1 deep copy failed if fd is secure_mode [1/1]
PD#SWPL-85927
Problem:
deep copy failed if fd is secure_mode
Solution:
Do not store the last received sample if it is secure_mode
Verify:
AP212
Change-Id: I343d4608e7a66fecc873299cea4a8275f51b5da2
Signed-off-by: sheng.liu <sheng.liu@amlogic.com>
diff --git a/src/gstamlvideosink.c b/src/gstamlvideosink.c
index f03bab8..98c4efe 100644
--- a/src/gstamlvideosink.c
+++ b/src/gstamlvideosink.c
@@ -739,6 +739,10 @@
if (need_pool)
pool = gst_drm_bufferpool_new(sink->secure_mode, GST_DRM_BUFFERPOOL_TYPE_VIDEO_PLANE);
+ // Do not store the last received sample if it is secure_mode
+ if (TRUE == sink->secure_mode)
+ gst_base_sink_set_last_sample_enabled(bsink, FALSE);
+
gst_query_add_allocation_pool(query, pool, sink_priv->video_info.size, DRMBP_EXTRA_BUF_SZIE_FOR_DISPLAY, DRMBP_LIMIT_MAX_BUFSIZE_TO_BUFSIZE);
if (pool)
g_object_unref(pool);