From 65cace22e2d65f1e98d88235d78ba20bc84620d8 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Thu, 19 Dec 2019 23:58:17 +0900 Subject: [PATCH] d3d11colorconvert: Set TRANSFER_NEED_DOWNLOAD flag to output memory for later cpu access Otherwise CPU cannot access texture via gst_memory_map() --- sys/d3d11/gstd3d11colorconvert.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/d3d11/gstd3d11colorconvert.c b/sys/d3d11/gstd3d11colorconvert.c index 743d803..3541a2d 100644 --- a/sys/d3d11/gstd3d11colorconvert.c +++ b/sys/d3d11/gstd3d11colorconvert.c @@ -892,6 +892,11 @@ gst_d3d11_color_convert_transform (GstBaseTransform * trans, (ID3D11Resource *) self->out_texture[i], 0, NULL); } gst_d3d11_device_unlock (device); + } else { + for (i = 0; i < gst_buffer_n_memory (outbuf); i++) { + GstMemory *mem = gst_buffer_peek_memory (outbuf, i); + GST_MINI_OBJECT_FLAG_SET (mem, GST_D3D11_MEMORY_TRANSFER_NEED_DOWNLOAD); + } } return GST_FLOW_OK; -- 2.7.4