d3d12bufferpool: Sync all memory objects on acquire_buffer()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6749>
This commit is contained in:
Seungha Yang 2024-04-27 00:07:53 +09:00 committed by GStreamer Marge Bot
parent ae5361b7fa
commit 00924d4820

View file

@ -316,9 +316,12 @@ gst_d3d12_buffer_pool_acquire_buffer (GstBufferPool * pool,
if (ret != GST_FLOW_OK)
return ret;
auto mem = (GstD3D12Memory *) gst_buffer_peek_memory (*buffer, 0);
GST_MINI_OBJECT_FLAG_UNSET (mem, GST_D3D12_MEMORY_TRANSFER_NEED_UPLOAD);
gst_d3d12_memory_sync (mem);
guint num_mems = gst_buffer_n_memory (*buffer);
for (guint i = 0; i < num_mems; i++) {
auto mem = (GstD3D12Memory *) gst_buffer_peek_memory (*buffer, i);
GST_MINI_OBJECT_FLAG_UNSET (mem, GST_D3D12_MEMORY_TRANSFER_NEED_UPLOAD);
gst_d3d12_memory_sync (mem);
}
return ret;
}