diff --git a/sys/d3d11/gstd3d11pluginutils.cpp b/sys/d3d11/gstd3d11pluginutils.cpp index c96479b1d5..5d899c765f 100644 --- a/sys/d3d11/gstd3d11pluginutils.cpp +++ b/sys/d3d11/gstd3d11pluginutils.cpp @@ -888,7 +888,7 @@ error: { guint i; for (i = 0; i < num_mapped; i++) { - GstMemory *mem = gst_buffer_peek_memory (buffer, num_mapped); + GstMemory *mem = gst_buffer_peek_memory (buffer, i); gst_memory_unmap (mem, &info[i]); }