gstreamer: fix patch and building warning for gst-plugins-bad
Signed-off-by: Andy Hu <andy.hu@starfivetech.com> (cherry picked from commit f475d9a3bceeefd19bebf3d3471cedf12a46b8fa)
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
--- a/sys/kms/gstkmssink.c 2020-10-26 19:14:46.656235000 +0800
|
||||
+++ b/sys/kms/gstkmssink.c 2021-12-16 15:35:15.590755066 +0800
|
||||
@@ -450,6 +450,18 @@
|
||||
goto bo_failed;
|
||||
fb_id = kmsmem->fb_id;
|
||||
|
||||
+ GST_INFO_OBJECT (self, "size = %lu, width = %d, height = %d.", vinfo->size, vinfo->width, vinfo->height);
|
||||
+ if (vinfo->size == vinfo->width * vinfo->height * 3 / 2) {
|
||||
+ GstMapInfo mapInfo;
|
||||
+ if (gst_memory_map((GstMemory *)kmsmem, &mapInfo, GST_MAP_WRITE)) {
|
||||
+ guint8 *start = mapInfo.data + vinfo->width * vinfo->height;
|
||||
+ guint32 size = vinfo->width * vinfo->height / 2;
|
||||
+ GST_INFO_OBJECT (self, "Set buffer to blank.");
|
||||
+ memset(start, 128, size);
|
||||
+ gst_memory_unmap((GstMemory *)kmsmem, &mapInfo);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
conn = drmModeGetConnector (self->fd, self->conn_id);
|
||||
if (!conn)
|
||||
goto connector_failed;
|
||||
Reference in New Issue
Block a user