d3d11: pluginutils: Fix wrong gst_memory_unmap() on _map() failure
authorSeungha Yang <seungha@centricular.com>
Wed, 14 Apr 2021 15:02:55 +0000 (00:02 +0900)
committerSeungha Yang <seungha@centricular.com>
Wed, 14 Apr 2021 15:05:03 +0000 (00:05 +0900)
It was obvious typo

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2164>

sys/d3d11/gstd3d11pluginutils.cpp

index c96479b..5d899c7 100644 (file)
@@ -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]);
     }